7
7
from tests .conftest import get_version , get_version_setup_py , create_file , create_pyproject_toml , create_setup_py
8
8
9
9
10
- def test_config_not_used (repo ):
10
+ def test_config_not_set (repo , create_config ):
11
+ create_config (repo , NotImplemented )
12
+
13
+ assert get_version (repo ) == "0.0.0"
14
+
15
+
16
+ @pytest .mark .parametrize (
17
+ "option" ,
18
+ ["version_config" , "setuptools_git_versioning" ],
19
+ )
20
+ def test_config_not_used (repo , option ):
11
21
create_file (
12
22
repo ,
13
23
"setup.py" ,
@@ -23,12 +33,13 @@ def test_config_not_used(repo):
23
33
24
34
setuptools.setup(
25
35
name="mypkg",
36
+ {option}=None,
26
37
)
27
38
finally:
28
39
coverage.stop()
29
40
coverage.save()
30
41
"""
31
- ),
42
+ ). format ( option = option ) ,
32
43
)
33
44
34
45
cfg = {
@@ -53,16 +64,6 @@ def test_config_not_used(repo):
53
64
assert get_version (repo , isolated = True ) == "0.0.0"
54
65
55
66
56
- @pytest .mark .parametrize (
57
- "option" ,
58
- ["version_config" , "setuptools_git_versioning" ],
59
- )
60
- def test_config_not_set (repo , create_config , option ):
61
- create_config (repo , NotImplemented , option = option )
62
-
63
- assert get_version (repo ) == "0.0.0"
64
-
65
-
66
67
@pytest .mark .parametrize (
67
68
"option" ,
68
69
["version_config" , "setuptools_git_versioning" ],
0 commit comments