fix ocrd_config test
from tests.base import main
from unittest import mock
+from pathlib import Path
import ocrd_utils
@@ -7,7 +8,8 @@ def test_config_loading():
XDG_CONFIG_HOME_before = ocrd_utils.XDG_CONFIG_HOME
with ocrd_utils.pushd_popd(tempdir=True) as tempdir:
ocrd_utils.XDG_CONFIG_HOME = tempdir
- with open('ocrd.yml', 'w', encoding='utf-8') as f:
+ Path('ocrd').mkdir()
+ with open('ocrd/config.yml', 'w', encoding='utf-8') as f:
f.write('resource_location: cache\n')
from ocrd.config import load_config_file
obj = load_config_file()
