@@ -36,24 +36,9 @@ class TestVersion:
36
36
"1.4.5rc0.post1+bad_" ,
37
37
],
38
38
)
39
- def test_parse_python_incorrect (self , project , python_version ):
40
- # Create a simple project
41
- (project / "pyproject.toml" ).write_text (
42
- """
43
- [build-system]
44
- requires = ["hatchling", "hatch-vcs"]
45
- build-backend = "hatchling.build"
46
- [project]
47
- name = "my-app"
48
- dynamic = ["version"]
49
- [tool.hatch.version]
50
- source = "nodejs"
51
- """
52
- )
53
- config = {}
54
- version_source = NodeJSVersionSource (project , config = config )
39
+ def test_parse_python_incorrect (self , python_version ):
55
40
with pytest .raises (ValueError , match = ".* did not match regex" ):
56
- version_source .python_version_to_node (python_version )
41
+ NodeJSVersionSource .python_version_to_node (python_version )
57
42
58
43
@pytest .mark .parametrize (
59
44
"node_version" ,
@@ -66,24 +51,9 @@ def test_parse_python_incorrect(self, project, python_version):
66
51
"1.4.5-rc0.post1+bad_" ,
67
52
],
68
53
)
69
- def test_parse_node_incorrect (self , project , node_version ):
70
- # Create a simple project
71
- (project / "pyproject.toml" ).write_text (
72
- """
73
- [build-system]
74
- requires = ["hatchling", "hatch-vcs"]
75
- build-backend = "hatchling.build"
76
- [project]
77
- name = "my-app"
78
- dynamic = ["version"]
79
- [tool.hatch.version]
80
- source = "nodejs"
81
- """
82
- )
83
- config = {}
84
- version_source = NodeJSVersionSource (project , config = config )
54
+ def test_parse_node_incorrect (self , node_version ):
85
55
with pytest .raises (ValueError , match = ".* did not match regex" ):
86
- version_source .node_version_to_python (node_version )
56
+ NodeJSVersionSource .node_version_to_python (node_version )
87
57
88
58
@pytest .mark .parametrize (
89
59
"node_version, python_version" ,
0 commit comments