Commit 7452c91f authored by Iñaki Malerba's avatar Iñaki Malerba

Merge branch 'fix-autopkgtest-fails' into 'master'

Fix unittests failure.

See merge request !22
parents a234cb0e b71887ea
Pipeline #61728 passed with stages
in 9 minutes and 40 seconds
Index: doit/dev_requirements.txt
===================================================================
--- doit.orig/dev_requirements.txt
+++ doit/dev_requirements.txt
@@ -2,7 +2,7 @@
# $ pip install --requirement dev_requirements.txt
pyflakes
-pytest>=2.8.0
+pytest>=4.0
pytest-ignore-flaky
coverage>=4.0
doit-py>=0.4.0
Index: doit/dodo.py
===================================================================
--- doit.orig/dodo.py
+++ doit/dodo.py
@@ -29,7 +29,7 @@ def task_pyflakes():
yield flaker.tasks('tests/*.py')
def run_test(test):
- return not bool(pytest.main(test))
+ return not bool(pytest.main([test]))
#return not bool(pytest.main("-v " + test))
def task_ut():
"""run unit-tests"""
Index: doit/tests/test_dependency.py
===================================================================
--- doit.orig/tests/test_dependency.py
+++ doit/tests/test_dependency.py
@@ -13,7 +13,7 @@ from doit.dependency import DbmDB, JsonD
from doit.dependency import DatabaseException, UptodateCalculator
from doit.dependency import FileChangedChecker, MD5Checker, TimestampChecker
from doit.dependency import DependencyStatus
-from .conftest import get_abspath, dep_manager
+from .conftest import get_abspath
#path to test folder
TEST_PATH = os.path.dirname(__file__)
@@ -67,8 +67,8 @@ def test_sqlite_import():
# create a separate fixture to be used only by this module
# because only here it is required to test with all backends
@pytest.fixture(params=[JsonDB, DbmDB, SqliteDB])
-def pdep_manager(request):
- return dep_manager(request)
+def pdep_manager(dep_manager):
+ return dep_manager
# FIXME there was major refactor breaking classes from dependency,
# unit-tests could be more specific to base classes.
change-pytest-fixture-syntax.patch
fix-pytest-gte-4-0.patch
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment