(self)
| 2098 | self.assertIn("spameggs42", names[0]) |
| 2099 | |
| 2100 | def test_create_pathlike_name(self): |
| 2101 | with tarfile.open(os_helper.FakePath(tmpname), self.mode) as tobj: |
| 2102 | self.assertIsInstance(tobj.name, str) |
| 2103 | self.assertEqual(tobj.name, os.path.abspath(tmpname)) |
| 2104 | tobj.add(os_helper.FakePath(self.file_path)) |
| 2105 | names = tobj.getnames() |
| 2106 | self.assertEqual(len(names), 1) |
| 2107 | self.assertIn('spameggs42', names[0]) |
| 2108 | |
| 2109 | with self.taropen(tmpname) as tobj: |
| 2110 | names = tobj.getnames() |
| 2111 | self.assertEqual(len(names), 1) |
| 2112 | self.assertIn('spameggs42', names[0]) |
| 2113 | |
| 2114 | def test_create_taropen_pathlike_name(self): |
| 2115 | with self.taropen(os_helper.FakePath(tmpname), "x") as tobj: |
nothing calls this directly
no test coverage detected