- use portable separators - paths should be prepended with r' (so backwards slash isn't treated as escaping) - sqlite connections should be closed (otherwise windows fails to remove the underlying db file) - workaround for emojis via PYTHONUTF8=1 test for now - make ZipPath portable - properly use tox python environment everywhere this was causing issues on Windows e.g. WARNING: test command found but not installed in testenv cmd: C:\hostedtoolcache\windows\Python\3.9.12\x64\python3.EXE
14 lines
511 B
Python
14 lines
511 B
Python
import os
|
|
from subprocess import check_call
|
|
|
|
def test_lists_modules() -> None:
|
|
# hack PYTHONUTF8 for windows
|
|
# see https://github.com/karlicoss/promnesia/issues/274
|
|
# https://memex.zulipchat.com/#narrow/stream/279600-promnesia/topic/indexing.3A.20utf8.28emoji.29.20filenames.20in.20Windows
|
|
# necessary for this test cause emooji is causing trouble
|
|
# TODO need to fix it properly
|
|
env = {
|
|
**os.environ,
|
|
'PYTHONUTF8': '1',
|
|
}
|
|
check_call(['hpi', 'modules'], env=env)
|