8
8
_PYTHON_VERSION = "." .join (map (str , sys .version_info [:2 ]))
9
9
10
10
11
- @pytest .mark .end_to_end
11
+ @pytest .mark .end_to_end ()
12
12
def test_bake_project (cookies ):
13
13
result = cookies .bake (
14
- extra_context = {"project_slug" : "helloworld" , "python_version" : _PYTHON_VERSION }
14
+ extra_context = {"project_slug" : "helloworld" , "python_version" : _PYTHON_VERSION },
15
15
)
16
16
17
17
assert result .exit_code == 0
@@ -20,13 +20,13 @@ def test_bake_project(cookies):
20
20
assert result .project_path .is_dir ()
21
21
22
22
23
- @pytest .mark .end_to_end
23
+ @pytest .mark .end_to_end ()
24
24
def test_remove_readthedocs (cookies ):
25
25
result = cookies .bake (
26
26
extra_context = {
27
27
"add_readthedocs" : "no" ,
28
28
"python_version" : "." .join (map (str , sys .version_info [:2 ])),
29
- }
29
+ },
30
30
)
31
31
32
32
rtd_config = result .project_path .joinpath (".readthedocs.yaml" )
@@ -39,10 +39,10 @@ def test_remove_readthedocs(cookies):
39
39
assert "readthedocs" not in readme
40
40
41
41
42
- @pytest .mark .end_to_end
42
+ @pytest .mark .end_to_end ()
43
43
def test_remove_github_actions (cookies ):
44
44
result = cookies .bake (
45
- extra_context = {"add_github_actions" : "no" , "python_version" : _PYTHON_VERSION }
45
+ extra_context = {"add_github_actions" : "no" , "python_version" : _PYTHON_VERSION },
46
46
)
47
47
48
48
ga_config = result .project_path .joinpath (".github" , "workflows" , "main.yml" )
@@ -55,10 +55,10 @@ def test_remove_github_actions(cookies):
55
55
assert "github/workflow/status" not in readme
56
56
57
57
58
- @pytest .mark .end_to_end
58
+ @pytest .mark .end_to_end ()
59
59
def test_remove_tox (cookies ):
60
60
result = cookies .bake (
61
- extra_context = {"add_tox" : "no" , "python_version" : _PYTHON_VERSION }
61
+ extra_context = {"add_tox" : "no" , "python_version" : _PYTHON_VERSION },
62
62
)
63
63
64
64
ga_config = result .project_path .joinpath (".github" , "workflows" , "main.yml" )
@@ -71,13 +71,13 @@ def test_remove_tox(cookies):
71
71
assert not tox .exists ()
72
72
73
73
74
- @pytest .mark .end_to_end
74
+ @pytest .mark .end_to_end ()
75
75
def test_remove_license (cookies ):
76
76
result = cookies .bake (
77
77
extra_context = {
78
78
"open_source_license" : "Not open source" ,
79
79
"python_version" : _PYTHON_VERSION ,
80
- }
80
+ },
81
81
)
82
82
83
83
license_ = result .project_path .joinpath ("LICENSE" )
@@ -88,7 +88,7 @@ def test_remove_license(cookies):
88
88
assert not license_ .exists ()
89
89
90
90
91
- @pytest .mark .end_to_end
91
+ @pytest .mark .end_to_end ()
92
92
@pytest .mark .skipif (os .environ .get ("CI" ) is None , reason = "Run only in CI." )
93
93
def test_check_conda_environment_creation_and_run_all_checks (cookies ):
94
94
"""Test that the conda environment is created and pre-commit passes."""
@@ -98,7 +98,7 @@ def test_check_conda_environment_creation_and_run_all_checks(cookies):
98
98
"make_initial_commit" : "yes" ,
99
99
"create_conda_environment_at_finish" : "yes" ,
100
100
"python_version" : _PYTHON_VERSION ,
101
- }
101
+ },
102
102
)
103
103
104
104
assert result .exit_code == 0
@@ -108,7 +108,9 @@ def test_check_conda_environment_creation_and_run_all_checks(cookies):
108
108
# Switch branch before pre-commit because otherwise failure because on main
109
109
# branch.
110
110
subprocess .run (
111
- ("git" , "checkout" , "-b" , "test" ), cwd = result .project_path , check = True
111
+ ("git" , "checkout" , "-b" , "test" ),
112
+ cwd = result .project_path ,
113
+ check = True ,
112
114
)
113
115
114
116
# Check linting, but not on the first try since formatters fix stuff.
0 commit comments