Turns out that fakefs
cls.fake_fs().cwd
needs to be cast to str
on Windows. This is very likely to be a platform related as Simon mentioned in the comments after trying to reproduce the problem on his linux machine. In this case code cwd
needs to be set in this way:
cls.fake_fs().cwd = str(Path.cwd() / "gamedev_co")