Minor changes for testing on non-Linux platforms #1838

Merged
g1itch merged 4 commits from windows-test into v0.6 2021-09-05 14:22:43 +02:00
3 changed files with 11 additions and 4 deletions
Showing only changes of commit dd20917fea - Show all commits

View File

@ -18,5 +18,5 @@ install:
- export PYTHONWARNINGS=all
script:
- python checkdeps.py
- xvfb-run src/bitmessagemain.py -t
- python src/bitmessagemain.py -t
- python -bm tests

View File

@ -1,6 +1,7 @@
coverage
python_prctl;platform_system=="Linux"
psutil
pycrypto
six
PyQt5;python_version>="3.7"
python_prctl;platform_system=="Linux"
six
xvfbwrapper;platform_system=="Linux"

View File

@ -3,6 +3,7 @@ Tests for core and those that do not work outside
(because of import error for example)
"""
import atexit
import os
import pickle # nosec
import Queue
@ -416,8 +417,9 @@ def run():
suite = loader.loadTestsFromTestCase(TestCore)
try:
import bitmessageqt.tests
from xvfbwrapper import Xvfb
except ImportError:
pass
Xvfb = None
else:
qt_tests = loader.loadTestsFromModule(bitmessageqt.tests)
suite.addTests(qt_tests)
@ -428,4 +430,8 @@ def run():
sys.excepthook = keep_exc
if Xvfb:
vdisplay = Xvfb(width=1024, height=768)
vdisplay.start()
atexit.register(vdisplay.stop)
return unittest.TextTestRunner(verbosity=2).run(suite)