MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_unoverwritable_fails

Method test_unoverwritable_fails

Lib/test/test_venv.py:408–415  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

406 rmtree(fn)
407
408 def test_unoverwritable_fails(self):
409 #create a file clashing with directories in the env dir
410 for paths in self.ENV_SUBDIRS[:3]:
411 fn = os.path.join(self.env_dir, *paths)
412 with open(fn, 'wb') as f:
413 f.write(b'')
414 self.assertRaises((ValueError, OSError), venv.create, self.env_dir)
415 self.clear_directory(self.env_dir)
416
417 # TODO: RUSTPYTHON
418 @unittest.expectedFailure

Callers

nothing calls this directly

Calls 5

clear_directoryMethod · 0.95
openFunction · 0.50
joinMethod · 0.45
writeMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected