File tree Expand file tree Collapse file tree 6 files changed +5
-63
lines changed Expand file tree Collapse file tree 6 files changed +5
-63
lines changed Original file line number Diff line number Diff line change 44"""This module contains tests for the gradle_cli_command module."""
55
66
7- from typing import Any
8-
97import pytest
108
119from macaron .build_spec_generator .cli_command_parser .gradle_cli_command import GradleCLIOptions
@@ -80,33 +78,6 @@ def test_comparing_gradle_cli_command_unequal(
8078 assert not this_command == that_command
8179
8280
83- @pytest .mark .parametrize (
84- ("command" , "that" ),
85- [
86- (
87- "gradle clean build -x test --debug --stacktrace -Dorg.gradle.caching=true" ,
88- True ,
89- ),
90- (
91- "gradle clean build -x test --debug --stacktrace -Dorg.gradle.caching=true" ,
92- ["boo" , "foo" ],
93- ),
94- (
95- "gradle clean build -x test --debug --stacktrace -Dorg.gradle.caching=true" ,
96- {"boo" , "foo" },
97- ),
98- ],
99- )
100- def test_comparing_gradle_cli_command_unequal_types (
101- gradle_cli_parser : GradleCLICommandParser ,
102- command : str ,
103- that : Any ,
104- ) -> None :
105- """Test comparing MavenCLICommand with another incompatible type oject."""
106- this_command = gradle_cli_parser .parse (command .split ())
107- assert not this_command == that
108-
109-
11081@pytest .mark .parametrize (
11182 ("command" ),
11283 [
Original file line number Diff line number Diff line change 33
44"""This module contains tests for the maven_cli_command module."""
55
6- from typing import Any
7-
86import pytest
97
108from macaron .build_spec_generator .cli_command_parser .maven_cli_command import MavenCLIOptions
@@ -65,33 +63,6 @@ def test_comparing_maven_cli_command_unequal(
6563 assert not this_command == that_command
6664
6765
68- @pytest .mark .parametrize (
69- ("command" , "that" ),
70- [
71- (
72- "mvn clean package -P profile1,profile2 -T 2C -ntp -Dmaven.skip.test=true -Dboo=foo" ,
73- True ,
74- ),
75- (
76- "mvn clean package -P profile1,profile2 -T 2C -ntp -Dmaven.skip.test=true -Dboo=foo" ,
77- ["boo" , "foo" ],
78- ),
79- (
80- "mvn clean package -P profile1,profile2 -T 2C -ntp -Dmaven.skip.test=true -Dboo=foo" ,
81- {"boo" , "foo" },
82- ),
83- ],
84- )
85- def test_comparing_maven_cli_command_unequal_types (
86- maven_cli_parser : MavenCLICommandParser ,
87- command : str ,
88- that : Any ,
89- ) -> None :
90- """Test comparing MavenCLICommand with another incompatible type oject."""
91- this_command = maven_cli_parser .parse (command .split ())
92- assert not this_command == that
93-
94-
9566@pytest .mark .parametrize (
9667 ("command" ),
9768 [
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ def compare_rc_build_spec(
6262 The result object.
6363 expected : dict[str, str]
6464 The expected object.
65- compare_fn_map : str
65+ compare_fn_map : dict[ str, CompareFn]
6666 A map from field name to corresponding compare function.
6767
6868 Returns
Original file line number Diff line number Diff line change @@ -470,7 +470,7 @@ def test_patching_multiple_commands(
470470 break
471471
472472 if effective_cli_parser :
473- expected_cli_commands .append (cli_parser .parse (cmd ))
473+ expected_cli_commands .append (effective_cli_parser .parse (cmd ))
474474 else :
475475 expected_cli_commands .append (
476476 UnparsedCLICommand (
Original file line number Diff line number Diff line change @@ -282,7 +282,7 @@ def test_lookup_any_build_command_empty_db(macaron_db_session: Session) -> None:
282282 assert not lookup_any_build_command (component_id = 1 , session = macaron_db_session )
283283
284284
285- def test_invalid_input_databse (invalid_db_session : Session ) -> None :
285+ def test_invalid_input_database (invalid_db_session : Session ) -> None :
286286 """Test handling invalid input database."""
287287 with pytest .raises (QueryMacaronDatabaseError ):
288288 lookup_any_build_command (
Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ def compare_list(
126126 The result array.
127127 expected : list
128128 The expected array.
129- compare_fn_map : str
129+ compare_fn_map : dict[ str, CompareFn]
130130 A map from field name to corresponding compare function.
131131 name : str
132132 The name of the field whose value is being compared in this function.
@@ -169,7 +169,7 @@ def compare_dict(
169169 The result object.
170170 expected : dict
171171 The expected object.
172- compare_fn_map : str
172+ compare_fn_map : dict[ str, CompareFn]
173173 A map from field name to corresponding compare function.
174174 name : str
175175 The name of the field whose value is being compared in this function.
You can’t perform that action at this time.
0 commit comments