File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -164,13 +164,14 @@ def test_contains(self):
164164 assert UseDep ("u1" ) not in d
165165 assert UseDep ("u" ) not in d
166166
167- # substrings
168- assert "u2? " in d
169- assert "b ) ) " in d
170- assert "z " not in d
167+ # stringified, flattened values
168+ assert "a " in d
169+ assert "b" in d
170+ assert "( b ) " not in d
171171
172- # non-Dependency objects return False
173- assert None not in d
172+ # all other object types return False
173+ for obj in (None , object ()):
174+ assert obj not in d
174175
175176 def test_iter (self ):
176177 assert list (Dependency .required_use ("a" )) == []
@@ -434,15 +435,15 @@ def test_contains(self):
434435 assert UseDep ("u1" ) not in d
435436 assert UseDep ("u" ) not in d
436437
437- # substrings
438+ # stringified, flattened values
438439 assert "a/b" in d
439- assert "u2? ( b/c )" in d
440- assert "u2?" in d
441- assert " ( " in d
442- assert "z" not in d
440+ assert "c/d" in d
441+ assert "u2? ( b/c )" not in d
442+ assert "u2?" not in d
443443
444444 # all other object types return False
445- assert None not in d
445+ for obj in (None , object ()):
446+ assert obj not in d
446447
447448 def test_eq_and_hash (self ):
448449 # ordering that doesn't matter for equivalence and hashing
You can’t perform that action at this time.
0 commit comments