Fixture `tmp_config_path` is failing on Windows
kadykov opened this issue · comments
kadykov commented
It seems that there is a problem with path representation.
tmp_path = WindowsPath('C:/Users/kadykov/AppData/Local/Temp/pytest-of-kadykov/pytest-2/test_package_scan0')
@pytest.fixture
def tmp_config_path(tmp_path):
key = "INTAKE_CONF_FILE"
original = os.getenv(key)
temp_config_path = os.path.join(tmp_path, "test_config.yml")
os.environ[key] = temp_config_path
> assert config.cfile() == temp_config_path
E AssertionError: assert 'C:/Users/kad...st_config.yml' == 'C:\\Users\\k...st_config.yml'
E - C:\Users\kadykov\AppData\Local\Temp\pytest-of-kadykov\pytest-2\test_package_scan0\test_config.yml
E ? ^ ^ ^ ^ ^ ^ ^ ^ ^
E + C:/Users/kadykov/AppData/Local/Temp/pytest-of-kadykov/pytest-2/test_package_scan0/test_config.yml
E ? ^ ^ ^ ^ ^ ^ ^ ^ ^
intake\conftest.py:59: AssertionError
Config:
- python 3.8.17
- intake latest version from github 81b1567