(self)
| 2047 | self.assertIn('spameggs42', names[0]) |
| 2048 | |
| 2049 | def test_create_existing(self): |
| 2050 | with tarfile.open(tmpname, self.mode) as tobj: |
| 2051 | tobj.add(self.file_path) |
| 2052 | |
| 2053 | with self.assertRaises(FileExistsError): |
| 2054 | tobj = tarfile.open(tmpname, self.mode) |
| 2055 | |
| 2056 | with self.taropen(tmpname) as tobj: |
| 2057 | names = tobj.getnames() |
| 2058 | self.assertEqual(len(names), 1) |
| 2059 | self.assertIn('spameggs42', names[0]) |
| 2060 | |
| 2061 | def test_create_taropen(self): |
| 2062 | with self.taropen(tmpname, "x") as tobj: |
nothing calls this directly
no test coverage detected