File tree Expand file tree Collapse file tree 3 files changed +27
-29
lines changed
Expand file tree Collapse file tree 3 files changed +27
-29
lines changed Original file line number Diff line number Diff line change 1- pytest_plugins = ("domdf_python_tools.testing " , )
1+ pytest_plugins = ("coincidence " , )
Original file line number Diff line number Diff line change 1- # stdlib
2- import pathlib
3- import tempfile
1+ # 3rd party
2+ from coincidence .regressions import AdvancedFileRegressionFixture
43
54# this package
65from notebook2script .pointless import Pointless
76
87
9- def test_pointless_checker (tmp_path ):
8+ def test_pointless_checker (tmp_path , advanced_file_regression : AdvancedFileRegressionFixture ):
109 # Make a file with some "pointless" statements
1110
1211 outfile = tmp_path / "test_script.py"
@@ -43,27 +42,4 @@ def test_pointless_checker(tmp_path):
4342
4443 linter .process_file (outfile )
4544
46- assert outfile .read_text () == """\
47- #!/use/bin/python3
48-
49- # Based on https://realpython.com/how-to-use-numpy-arange/
50-
51- import numpy as np
52-
53- np.arange(start=1, stop=10, step=3)
54-
55- np.arange(start=1, stop=10)
56-
57- np.arange(
58- start=1,
59- stop=10,
60- step=1
61- )
62-
63- np.arange(
64- start=1, stop=10, step=1
65- )
66-
67- data = np.arange(10)
68- print(data)
69- """
45+ advanced_file_regression .check_file (outfile )
Original file line number Diff line number Diff line change 1+ #!/use/bin/python3
2+
3+ # Based on https://realpython.com/how-to-use-numpy-arange/
4+
5+ import numpy as np
6+
7+ np .arange (start = 1 , stop = 10 , step = 3 )
8+
9+ np .arange (start = 1 , stop = 10 )
10+
11+ np .arange (
12+ start = 1 ,
13+ stop = 10 ,
14+ step = 1
15+ )
16+
17+ np .arange (
18+ start = 1 , stop = 10 , step = 1
19+ )
20+
21+ data = np .arange (10 )
22+ print (data )
You can’t perform that action at this time.
0 commit comments