test_logging_conf: use pushd_popd not chdir
@@ -7,6 +7,7 @@ import re
import shutil
import sys
+from ocrd_utils import pushd_popd
from ocrd_utils.logging import (
initLogging,
getLogger
@@ -32,7 +33,7 @@ def test_configured_dateformat(logging_conf, capsys):
"""Ensure example ocrd_logging.conf is valid and produces desired record format"""
# arrange
- os.chdir(logging_conf)
+ with pushd_popd(logging_conf):
initLogging()
test_logger = getLogger('')
