diff --git a/.travis.yml b/.travis.yml index 94aeacdfc..d2e5d467d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,9 +4,7 @@ python: install: - sudo apt-get update - sudo apt-get install portaudio19-dev - - pip install PyQt5 sip - pip install -r requirements.txt - - bash tools/build_ui.sh - pip install nose - pip install coveralls diff --git a/tests/test_run.py b/tests/test_run.py deleted file mode 100644 index 125c50652..000000000 --- a/tests/test_run.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding: utf-8 -from contextlib import contextmanager - -import aqt -from aqt import _run -from aqt.profiles import ProfileManager - - -@contextmanager -def temporaryUser(name="__Temporary Test User__"): - - pm = ProfileManager(base="") - - if name in pm.profiles(): - raise Exception(f"Could not create a temporary user with name {name}") - - pm.create(name) - pm.name = name - - yield name - - pm.remove(name) - -def test_run(): - - # we need a new user for the test - with temporaryUser() as name: - app = _run(argv=["anki", "-p", name], exec=False) - assert app - - aqt.mw.cleanupAndExit() - - # clean up what was spoiled - aqt.mw = None - - # remove hooks added during app initialization - from anki import hooks - hooks._hooks = {} - - # test_nextIvl will fail on some systems if the locales are not restored - import locale - locale.setlocale(locale.LC_ALL, locale.getdefaultlocale())