(self)
| 2068 | self.assertIn('spameggs42', names[0]) |
| 2069 | |
| 2070 | def test_create_existing_taropen(self): |
| 2071 | with self.taropen(tmpname, "x") as tobj: |
| 2072 | tobj.add(self.file_path) |
| 2073 | |
| 2074 | with self.assertRaises(FileExistsError): |
| 2075 | with self.taropen(tmpname, "x"): |
| 2076 | pass |
| 2077 | |
| 2078 | with self.taropen(tmpname) as tobj: |
| 2079 | names = tobj.getnames() |
| 2080 | self.assertEqual(len(names), 1) |
| 2081 | self.assertIn("spameggs42", names[0]) |
| 2082 | |
| 2083 | def test_create_pathlike_name(self): |
| 2084 | with tarfile.open(os_helper.FakePath(tmpname), self.mode) as tobj: |
nothing calls this directly
no test coverage detected