File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -81,6 +81,7 @@ def deps(
8181 deps_select = {
8282 d : markers
8383 for d , markers in sorted (deps_select .items ())
84+ if d not in deps
8485 },
8586 )
8687
Original file line number Diff line number Diff line change @@ -161,6 +161,24 @@ def test_all_markers_are_added(env):
161161
162162_tests .append (test_all_markers_are_added )
163163
164+ def test_markers_with_extra (env ):
165+ requires_dist = [
166+ "bar" ,
167+ 'baz!=1.56.0; sys_platform == "darwin" and extra == "client"' ,
168+ 'baz; extra == "client"' ,
169+ ]
170+
171+ got = deps (
172+ "foo" ,
173+ extras = ["client" ],
174+ requires_dist = requires_dist ,
175+ )
176+
177+ env .expect .that_collection (got .deps ).contains_exactly (["bar" , "baz" ])
178+ env .expect .that_dict (got .deps_select ).contains_exactly ({})
179+
180+ _tests .append (test_markers_with_extra )
181+
164182def deps_test_suite (name ): # buildifier: disable=function-docstring
165183 test_suite (
166184 name = name ,
You can’t perform that action at this time.
0 commit comments