Skip to content

Commit 362b1b3

Browse files
committed
Move --import-mode=importlib out of addopts
1 parent 9ae41df commit 362b1b3

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ jobs:
176176
if [[ $FAST_COMPILE == "1" ]]; then export PYTENSOR_FLAGS=$PYTENSOR_FLAGS,mode=FAST_COMPILE; fi
177177
if [[ $FLOAT32 == "1" ]]; then export PYTENSOR_FLAGS=$PYTENSOR_FLAGS,floatX=float32; fi
178178
export PYTENSOR_FLAGS=$PYTENSOR_FLAGS,warn__ignore_bug_before=all,on_opt_error=raise,on_shape_error=raise,gcc__cxxflags=-pipe
179-
pytest -r A --verbose --runslow --durations=50 --cov=pytensor/ --cov-report=xml:coverage/coverage-${MATRIX_ID}.xml --no-cov-on-fail $PART --benchmark-skip
179+
pytest --import-mode=importlib -r A --verbose --runslow --durations=50 --cov=pytensor/ --cov-report=xml:coverage/coverage-${MATRIX_ID}.xml --no-cov-on-fail $PART --benchmark-skip
180180
env:
181181
MATRIX_ID: ${{ steps.matrix-id.outputs.id }}
182182
MKL_THREADING_LAYER: GNU
@@ -231,7 +231,7 @@ jobs:
231231
shell: micromamba-shell {0}
232232
run: |
233233
export PYTENSOR_FLAGS=mode=FAST_COMPILE,warn__ignore_bug_before=all,on_opt_error=raise,on_shape_error=raise,gcc__cxxflags=-pipe
234-
pytest --runslow --benchmark-only --benchmark-json output.json
234+
pytest --import-mode=importlib --runslow --benchmark-only --benchmark-json output.json
235235
- name: Store benchmark result
236236
uses: benchmark-action/github-action-benchmark@v1
237237
with:

pyproject.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,12 @@ versionfile_build = "pytensor/_version.py"
117117
tag_prefix = "rel-"
118118

119119
[tool.pytest]
120-
addopts = "--durations=50 --doctest-modules pytensor --import-mode=importlib --ignore=pytensor/misc/check_duplicate_key.py --ignore=pytensor/link"
120+
addopts = [
121+
"--durations=50",
122+
"--doctest-modules=pytensor",
123+
"--ignore=pytensor/misc/check_duplicate_key.py",
124+
"--ignore=pytensor/link"
125+
]
121126
testpaths = "tests/"
122127

123128
[tool.ruff]

0 commit comments

Comments
 (0)