File tree Expand file tree Collapse file tree 4 files changed +23
-20
lines changed Expand file tree Collapse file tree 4 files changed +23
-20
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ lint = [
54
54
test = [
55
55
' pytest' ,
56
56
' pytest-cov' ,
57
+ ' pytest-pythonhashseed' ,
57
58
' pytest-ruff' ,
58
59
' ruff==0.4.10' ,
59
60
]
@@ -67,17 +68,21 @@ Homepage = 'https://github.com/mr-mixas/Nested-Diff.py'
67
68
Repository = ' https://github.com/mr-mixas/Nested-Diff.py.git'
68
69
69
70
[tool .pytest .ini_options ]
70
- addopts = """
71
- --cov=nested_diff \
72
- --cov-fail-under=99 \
73
- --cov-report term-missing \
74
- --no-cov-on-fail \
75
- --ruff \
76
- --ruff-format \
77
- --verbosity=2 \
78
- """
71
+ addopts = [
72
+ ' --cov=nested_diff' ,
73
+ ' --cov-fail-under=99' ,
74
+ ' --cov-report' , ' term-missing' ,
75
+ ' --no-cov-on-fail' ,
76
+ ' --doctest-modules' ,
77
+ ' --doctest-glob=*.md' ,
78
+ ' --pythonhashseed' , ' 1' ,
79
+ ' --ruff' ,
80
+ ' --ruff-format' ,
81
+ ' --verbosity=2' ,
82
+ ]
83
+
79
84
doctest_optionflags = ' NORMALIZE_WHITESPACE'
80
- testpaths = ' nested_diff tests'
85
+ testpaths = ' nested_diff tests *.md '
81
86
82
87
[tool .ruff ]
83
88
extend-exclude = [
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ def format_test(**kwargs):
15
15
}},""" .format (** kwargs )
16
16
17
17
18
- def generate_tests (source_dir = sys . argv [ 1 ] ):
18
+ def generate_tests (source_dir ):
19
19
tests = []
20
20
for file_name in sorted (os .listdir (source_dir )):
21
21
with open (os .path .join (source_dir , file_name )) as f :
@@ -66,4 +66,4 @@ def get_tests():
66
66
67
67
68
68
if __name__ == '__main__' :
69
- generate_tests ()
69
+ generate_tests (sys . argv [ 1 ] )
Original file line number Diff line number Diff line change
1
+ import os
2
+
3
+
4
+ def test_pythonhashseed ():
5
+ assert os .environ ['PYTHONHASHSEED' ] == '1'
Original file line number Diff line number Diff line change @@ -10,22 +10,15 @@ extras =
10
10
cli
11
11
test
12
12
13
- setenv =
14
- PYTHONHASHSEED = 1
15
-
16
13
[testenv:extended]
17
14
commands =
18
- pytest --doctest-modules
19
- python -m doctest HOWTO.md README.md
15
+ pytest
20
16
darglint nested_diff
21
17
22
18
extras =
23
19
{[testenv:essential]extras}
24
20
lint
25
21
26
- setenv =
27
- PYTHONHASHSEED = 1
28
-
29
22
# pyproject.toml not support yet
30
23
[darglint]
31
24
docstring_style =google
You can’t perform that action at this time.
0 commit comments