(self)
| 2085 | self.assertIn('spameggs42', names[0]) |
| 2086 | |
| 2087 | def test_create_existing_taropen(self): |
| 2088 | with self.taropen(tmpname, "x") as tobj: |
| 2089 | tobj.add(self.file_path) |
| 2090 | |
| 2091 | with self.assertRaises(FileExistsError): |
| 2092 | with self.taropen(tmpname, "x"): |
| 2093 | pass |
| 2094 | |
| 2095 | with self.taropen(tmpname) as tobj: |
| 2096 | names = tobj.getnames() |
| 2097 | self.assertEqual(len(names), 1) |
| 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: |
nothing calls this directly
no test coverage detected