@@ -23,9 +23,9 @@ def test_basic_build(example_pkg):
23
23
spin ("build" )
24
24
25
25
assert Path ("build" ).exists (), "`build` folder not created after `spin build`"
26
- assert Path (
27
- "build-install"
28
- ). exists (), "`build-install` folder not created after `spin build`"
26
+ assert Path ("build-install" ). exists (), (
27
+ "` build-install` folder not created after `spin build` "
28
+ )
29
29
30
30
31
31
def test_debug_builds (example_pkg ):
@@ -64,17 +64,17 @@ def test_coverage_reports(example_pkg, report_type, output_file):
64
64
spin ("test" , "--gcov" , f"--gcov-format={ report_type } " )
65
65
66
66
coverage_report = Path ("./build/meson-logs" , output_file )
67
- assert (
68
- coverage_report . exists ()
69
- ), f"coverage report not generated for gcov build ( { report_type } )"
67
+ assert coverage_report . exists (), (
68
+ f"coverage report not generated for gcov build ( { report_type } )"
69
+ )
70
70
71
71
72
72
def test_expand_pythonpath (example_pkg ):
73
73
"""Does an $ENV_VAR get expanded in `spin run`?"""
74
74
output = spin ("run" , "echo $PYTHONPATH" )
75
- assert any (
76
- p in stdout (output ) for p in ( "site-packages" , "dist-packages" )
77
- ), f"Expected value of $PYTHONPATH, got { stdout ( output ) } instead"
75
+ assert any (p in stdout ( output ) for p in ( "site-packages" , "dist-packages" )), (
76
+ f"Expected value of $PYTHONPATH, got { stdout (output )} instead"
77
+ )
78
78
79
79
80
80
def test_run_stdout (example_pkg ):
@@ -85,9 +85,9 @@ def test_run_stdout(example_pkg):
85
85
"-c" ,
86
86
"import sys; del sys.path[0]; import example_pkg; print(example_pkg.__version__)" ,
87
87
)
88
- assert (
89
- stdout (p ) == "0.0.0dev0 "
90
- ), f"`spin run` stdout did not yield version, but { stdout ( p ) } "
88
+ assert stdout ( p ) == "0.0.0dev0" , (
89
+ f"`spin run` stdout did not yield version, but { stdout (p )} "
90
+ )
91
91
92
92
93
93
# Detecting whether a file is executable is not that easy on Windows,
@@ -97,9 +97,9 @@ def test_recommend_run_python(example_pkg):
97
97
"""If `spin run file.py` is called, is `spin run python file.py` recommended?"""
98
98
with tempfile .NamedTemporaryFile (suffix = ".py" ) as f :
99
99
p = spin ("run" , f .name , sys_exit = False )
100
- assert "Did you mean to call" in stdout (
101
- p
102
- ), "Failed to recommend `python run python file.py`"
100
+ assert "Did you mean to call" in stdout (p ), (
101
+ "Failed to recommend `python run python file.py`"
102
+ )
103
103
104
104
105
105
def test_sdist (example_pkg ):
0 commit comments