File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -150,14 +150,12 @@ def test_eq_and_hash(self):
150150 assert len ({d1 , d2 }) == 2
151151
152152 def test_contains (self ):
153- # simple dependencies don't contain themselves
154- assert Dependency .required_use ("a" ) not in Dependency .required_use ("a" )
155-
156- # only top-level Dependency objects have membership
153+ # Dependency objects
157154 d = Dependency .required_use ("!u1? ( a u2? ( b ) )" )
155+ assert d in d
158156 assert Dependency .required_use ("a" ) in d
159157 assert Dependency .required_use ("u2? ( b )" ) in d
160- assert Dependency .required_use ("b" ) not in d
158+ assert Dependency .required_use ("b" ) in d
161159
162160 # substrings
163161 assert "u2?" in d
@@ -416,15 +414,13 @@ def test_evaluate(self):
416414 assert not d1 .evaluate (False )
417415
418416 def test_contains (self ):
419- # only top-level Dependency objects have membership
417+ # Dependency objects
420418 assert Dependency ("a/b" ) in self .cls ("a/b" )
421- assert Dependency ("a/b" ) not in self .cls ("u? ( a/b )" )
419+ assert Dependency ("a/b" ) in self .cls ("u? ( a/b )" )
422420
423- # valid Dependency objects
421+ # substrings
424422 assert "a/b" in self .cls ("a/b" )
425423 assert "u? ( c/d )" in self .cls ("a/b u? ( c/d )" )
426-
427- # substrings
428424 assert "u?" in self .cls ("a/b u? ( c/d )" )
429425 assert " ( " in self .cls ("a/b u? ( c/d )" )
430426
You can’t perform that action at this time.
0 commit comments