mirror of https://github.com/Textualize/rich.git
Fix test_syntax not to use identity comparison on string
Fix test_syntax to compare strings via "==" rather than "is", in order to fix test failure on PyPy3.
This commit is contained in:
parent
94273ee703
commit
8e3a0be6fb
|
@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
- Add support for US spelling of "gray" in ANSI color names https://github.com/Textualize/rich/issues/1890
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed `test_syntax.py::test_from_path_lexer_override` test failure on PyPy3 https://github.com/Textualize/rich/pull/1904
|
||||
|
||||
## [11.1.0] - 2022-01-28
|
||||
|
||||
### Added
|
||||
|
|
|
@ -27,3 +27,4 @@ The following people have contributed to the development of Rich:
|
|||
- [Nicolas Simonds](https://github.com/0xDEC0DE)
|
||||
- [Gabriele N. Tornetta](https://github.com/p403n1x87)
|
||||
- [Patrick Arminio](https://github.com/patrick91)
|
||||
- [Michał Górny](https://github.com/mgorny)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue