(self)
| 2038 | os_helper.unlink(cls.file_path) |
| 2039 | |
| 2040 | def test_create(self): |
| 2041 | with tarfile.open(tmpname, self.mode) as tobj: |
| 2042 | tobj.add(self.file_path) |
| 2043 | |
| 2044 | with self.taropen(tmpname) as tobj: |
| 2045 | names = tobj.getnames() |
| 2046 | self.assertEqual(len(names), 1) |
| 2047 | self.assertIn('spameggs42', names[0]) |
| 2048 | |
| 2049 | def test_create_existing(self): |
| 2050 | with tarfile.open(tmpname, self.mode) as tobj: |