spacepaste

  1.  
  2. def test_handle_missing_config_directory(self):
  3. """Create the config directory if it does not exist."""
  4. self.filesystem.remove_empty_directory(self.locator.root)
  5. self.run_cli(["-l", "foo", "-i", "bar", "--persist"])
  6. contents = _load_config(
  7. filesystem=self.filesystem,
  8. locator=self.locator,
  9. )
  10. self.assertEqual(
  11. contents,
  12. {'virtualenv': {"bar": {"install": ["bar"], "link": ["foo"]}}}
  13. )
  14. def fake_create(self, virtualenv, **kwargs):
  15. try:
  16. self.filesystem.create_directory(path=virtualenv.path)
  17. except FileExists:
  18. pass
  19. File "/home/user/Documents/venvs/venvs/tests/utils.py", line 61, in fake_create
  20. self.filesystem.create_directory(path=virtualenv.path)
  21. File "/home/user/Documents/venvs/venv/lib/python3.6/site-packages/filesystems/memory.py", line 187, in <lambda>
  22. lambda fs, *args, **kw: fs._state.create_directory(*args, **kw)
  23. File "/home/user/Documents/venvs/venv/lib/python3.6/site-packages/filesystems/memory.py", line 93, in create_directory
  24. raise exceptions.FileNotFound(parent)
  25. filesystems.exceptions.FileNotFound: No such file or directory: /virtualenvs
  26.