(self)
| 2055 | os_helper.unlink(cls.file_path) |
| 2056 | |
| 2057 | def test_create(self): |
| 2058 | with tarfile.open(tmpname, self.mode) as tobj: |
| 2059 | tobj.add(self.file_path) |
| 2060 | |
| 2061 | with self.taropen(tmpname) as tobj: |
| 2062 | names = tobj.getnames() |
| 2063 | self.assertEqual(len(names), 1) |
| 2064 | self.assertIn('spameggs42', names[0]) |
| 2065 | |
| 2066 | def test_create_existing(self): |
| 2067 | with tarfile.open(tmpname, self.mode) as tobj: |