(self)
| 2064 | self.assertIn('spameggs42', names[0]) |
| 2065 | |
| 2066 | def test_create_existing(self): |
| 2067 | with tarfile.open(tmpname, self.mode) as tobj: |
| 2068 | tobj.add(self.file_path) |
| 2069 | |
| 2070 | with self.assertRaises(FileExistsError): |
| 2071 | tobj = tarfile.open(tmpname, self.mode) |
| 2072 | |
| 2073 | with self.taropen(tmpname) as tobj: |
| 2074 | names = tobj.getnames() |
| 2075 | self.assertEqual(len(names), 1) |
| 2076 | self.assertIn('spameggs42', names[0]) |
| 2077 | |
| 2078 | def test_create_taropen(self): |
| 2079 | with self.taropen(tmpname, "x") as tobj: |
nothing calls this directly
no test coverage detected