Skip to content

Commit

Permalink
Fix test_syntax not to use identity comparison on string
Browse files Browse the repository at this point in the history
Fix test_syntax to compare strings via "==" rather than "is", in order
to fix test failure on PyPy3.
  • Loading branch information
mgorny committed Feb 1, 2022
1 parent 94273ee commit 4b8d607
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_syntax.py
Expand Up @@ -277,7 +277,7 @@ def test_from_path_lexer_override():
try:
os.write(fh, b"import this\n")
syntax = Syntax.from_path(path, lexer="rust")
assert syntax.lexer.name is "Rust"
assert syntax.lexer.name == "Rust"
assert syntax.code == "import this\n"
finally:
os.remove(path)
Expand Down

0 comments on commit 4b8d607

Please sign in to comment.