Terminalausgabe :
(Hat jemand einen Tipp zum Formatieren der Terminalausgabe ohne automatische Syntaxhervorhebung?)
Code: Select all
E
======================================================================
ERROR: test_top_folders_exist (file_checker.tests.file_checker_tests.TestFolderCheck.test_top_folders_exist)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\juank\dev\projects\python\gamedev_eco\file_checker\tests\file_checker_tests.py", line 20, in test_top_folders_exist
self.fs.create_dir(Path.cwd() / "gdd")
~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
File "C:\Users\juank\AppData\Local\Programs\Python\Python313\Lib\site-packages\pyfakefs\fake_filesystem.py", line 2191, in create_dir
dir_path = self.absnormpath(dir_path)
File "C:\Users\juank\AppData\Local\Programs\Python\Python313\Lib\site-packages\pyfakefs\fake_filesystem.py", line 1133, in absnormpath
path = self.replace_windows_root(path)
File "C:\Users\juank\AppData\Local\Programs\Python\Python313\Lib\site-packages\pyfakefs\fake_filesystem.py", line 1418, in replace_windows_root
if path and self.is_windows_fs and self.root_dir:
^^^^^^^^^^^^^
File "C:\Users\juank\AppData\Local\Programs\Python\Python313\Lib\site-packages\pyfakefs\fake_filesystem.py", line 357, in root_dir
return self._mount_point_dir_for_cwd()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "C:\Users\juank\AppData\Local\Programs\Python\Python313\Lib\site-packages\pyfakefs\fake_filesystem.py", line 631, in _mount_point_dir_for_cwd
if path.startswith(str_root_path) and len(str_root_path) > len(mount_path):
^^^^^^^^^^^^^^^
AttributeError: 'WindowsPath' object has no attribute 'startswith'
----------------------------------------------------------------------
Ran 1 test in 0.011s
FAILED (errors=1)
Code: Select all
from pyfakefs.fake_filesystem_unittest import TestCase
class TestFolderCheck(TestCase):
"""Test top folders = gdd marketing business"""
@classmethod
def setUp(cls):
cls.setUpClassPyfakefs()
cls.fake_fs().create_dir(Path.cwd() / "gamedev_eco")
cls.fake_fs().cwd = Path.cwd() / "gamedev_eco"
def test_top_folders_exist(self):
self.fs.create_dir(Path.cwd() / "gdd")
Hat jemand Erfahrung mit Pyfakefs?
Kann mir bitte jemand bei diesem Problem behilflich sein?