Skip to content

Commit a05ecf4

Browse files
committed
fix ocrd_config test
1 parent 53a591d commit a05ecf4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/test_ocrd_config.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
from tests.base import main
22
from unittest import mock
3+
from pathlib import Path
34

45
import ocrd_utils
56

67
def test_config_loading():
78
XDG_CONFIG_HOME_before = ocrd_utils.XDG_CONFIG_HOME
89
with ocrd_utils.pushd_popd(tempdir=True) as tempdir:
910
ocrd_utils.XDG_CONFIG_HOME = tempdir
10-
with open('ocrd.yml', 'w', encoding='utf-8') as f:
11+
Path('ocrd').mkdir()
12+
with open('ocrd/config.yml', 'w', encoding='utf-8') as f:
1113
f.write('resource_location: cache\n')
1214
from ocrd.config import load_config_file
1315
obj = load_config_file()

0 commit comments

Comments
 (0)