Skip to content

Commit fbd14ed

Browse files
committed
Fix pytest config in pyproject.toml
1 parent b28a3a7 commit fbd14ed

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878
install-jax: [0]
7979
install-torch: [0]
8080
part:
81-
- "--doctest-modules --ignore=pytensor/misc/check_duplicate_key.py pytensor --ignore=pytensor/link"
81+
- "--doctest-modules pytensor --ignore=pytensor/misc/check_duplicate_key.py --ignore=pytensor/link"
8282
- "tests --ignore=tests/tensor --ignore=tests/scan --ignore=tests/sparse"
8383
- "tests/scan"
8484
- "tests/sparse"
@@ -97,9 +97,9 @@ jobs:
9797
part: "tests/tensor/test_math.py"
9898
- fast-compile: 1
9999
float32: 1
100-
- part: "--doctest-modules --ignore=pytensor/misc/check_duplicate_key.py pytensor --ignore=pytensor/link"
100+
- part: "--doctest-modules pytensor --ignore=pytensor/misc/check_duplicate_key.py --ignore=pytensor/link"
101101
float32: 1
102-
- part: "--doctest-modules --ignore=pytensor/misc/check_duplicate_key.py pytensor --ignore=pytensor/link"
102+
- part: "--doctest-modules pytensor --ignore=pytensor/misc/check_duplicate_key.py --ignore=pytensor/link"
103103
fast-compile: 1
104104
include:
105105
- install-numba: 1

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,9 @@ versionfile_source = "pytensor/_version.py"
116116
versionfile_build = "pytensor/_version.py"
117117
tag_prefix = "rel-"
118118

119-
[tool.pytest]
120-
addopts = "--durations=50 --doctest-modules pytensor --ignore=pytensor/misc/check_duplicate_key.py --ignore=pytensor/link"
121-
testpaths = "tests/"
119+
[tool.pytest.ini_options]
120+
addopts = "--durations=50 --doctest-modules --ignore=pytensor/link --ignore=pytensor/misc/check_duplicate_key.py"
121+
testpaths = ["pytensor/", "tests/"]
122122

123123
[tool.ruff]
124124
line-length = 88

tests/unittest_tools.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ def fetch_seed(pseed=None):
2727
None, which is equivalent to seeding with a random seed.
2828
2929
Useful for seeding RandomState or Generator objects.
30-
>>> rng = np.random.RandomState(unittest_tools.fetch_seed())
31-
>>> rng = np.random.default_rng(unittest_tools.fetch_seed())
30+
>>> rng = np.random.RandomState(fetch_seed())
31+
>>> rng = np.random.default_rng(fetch_seed())
3232
"""
3333

3434
seed = pseed or config.unittests__rseed

0 commit comments

Comments
 (0)