File tree Expand file tree Collapse file tree 3 files changed +100
-84
lines changed
Expand file tree Collapse file tree 3 files changed +100
-84
lines changed Original file line number Diff line number Diff line change 44# to fix eventual module import errors that can arise, for example when
55# running tests from inside VS code.
66# See https://stackoverflow.com/a/34520971
7+ import json
8+
9+ import numpy as np
10+ import pytest
11+
12+ pytest .RNG = np .random .default_rng ()
13+ # pytest.RNG.bit_generator.state = {
14+ # Set RNG state here
15+ # }
16+
17+
18+ def pytest_configure (config ):
19+ """
20+ Called after command line options have been parsed
21+ and all plugins and initial conftest files been loaded.
22+ """
23+ state = json .dumps (pytest .RNG .bit_generator .state , indent = 4 )
24+ print (f"conftest.py: pytest.RNG.bit_generator.state = { state } " )
Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ check_flake()
8383check_print ()
8484{
8585 if [[ $print_mode == " verbose" ]]; then
86- if [[ ` grep print * /* .py | wc -l` -gt " 0" ]]; then
86+ if [[ ` grep print --exclude= " conftext.py " * /* .py | wc -l` -gt " 0" ]]; then
8787 echo " Error: print statement found in code"
8888 grep print * /* .py
8989 exit 1
You can’t perform that action at this time.
0 commit comments