Skip to content

Commit

Permalink
Configure pytest to properly locate conftest.py
Browse files Browse the repository at this point in the history
In pytest 7.4.0, there were some changes to how the configuration file
for pytest is located. In our case, this resulted in a failure to find
the conftest.py with the needed fixtures which then prevented our python
tests from being executed successfully.

Configure the --confcutdir to ensure it points to the system test
directory, where our conftest.py is located.

Related pytest-dev/pytest#11043
  • Loading branch information
nicki-krizek committed Jul 20, 2023
1 parent 4970af5 commit 90e3305
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/tests/system/run.sh
Expand Up @@ -237,7 +237,7 @@ if [ $status -eq 0 ]; then
if start_servers; then
run=$((run+1))
test_status=0
(cd "$systest" && "$PYTEST" -rsxX -v "$test" "$@" || echo "$?" > "$test.status") | SYSTESTDIR="$systest" cat_d
(cd "$systest" && "$PYTEST" --confcutdir ../ -rsxX -v "$test" "$@" || echo "$?" > "$test.status") | SYSTESTDIR="$systest" cat_d
if [ -f "$systest/$test.status" ]; then
if [ "$(cat "$systest/$test.status")" != "5" ]; then
test_status=$(cat "$systest/$test.status")
Expand Down

0 comments on commit 90e3305

Please sign in to comment.