aboutsummaryrefslogtreecommitdiffstats
path: root/lib/toaster/tests/toaster-tests-requirements.txt
diff options
context:
space:
mode:
authorAlassane Yattara <alassane.yattara@savoirfairelinux.com>2023-10-27 20:00:42 +0100
committerAlassane Yattara <alassane.yattara@savoirfairelinux.com>2023-11-09 18:35:09 +0100
commit29dfc6214111853a0417db49dd2967cf99fae29b (patch)
tree213e0dc48462acec5014a1c166a9405cc13bdbe7 /lib/toaster/tests/toaster-tests-requirements.txt
parent115e84d6365d44bfb36e7b2c914e146d6f5a5164 (diff)
downloadbitbake-contrib-29dfc6214111853a0417db49dd2967cf99fae29b.tar.gz
Toaster: fixed: Tests fail when executed one after the other out of sequenceyattdev/Feature-generate-positive-tests-report-using-pytest
As mentionned in earlier commit, pytest-django takes a conservative approach to enabling database access. By default our tests will fail if they try to access the database, Only if we explicitly request database access will this be allowed, using pytest marks to tell pytest-django our test needs database access. A side effect of pytest mark, is test_case method marked is execute out of scope of its module class, which create an inconsistance sequence and make fails followings tests. The scope of the ordering is global per default, e.g. tests with lower ordinal numbers are always executed before tests with higher numbers in the same test session, regardless of the module and class they reside in. This can be changed by using the --order-scope option from module pytest-order. To fix that i added execution order to tests suite using pytest-order. Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
Diffstat (limited to 'lib/toaster/tests/toaster-tests-requirements.txt')
-rw-r--r--lib/toaster/tests/toaster-tests-requirements.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/toaster/tests/toaster-tests-requirements.txt b/lib/toaster/tests/toaster-tests-requirements.txt
index 7109c625d..71cc08343 100644
--- a/lib/toaster/tests/toaster-tests-requirements.txt
+++ b/lib/toaster/tests/toaster-tests-requirements.txt
@@ -4,3 +4,4 @@ pytest-django==4.5.2
pytest-env==1.1.0
pytest-html==4.0.2
pytest-metadata==3.0.0
+pytest-order==1.1.0