Skip to content

Commit

Permalink
test: update test dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
ObserverOfTime committed Sep 8, 2024
1 parent 5ac3dd3 commit e164972
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ email = "[email protected]"
[project.optional-dependencies]
docs = ["sphinx~=7.3", "sphinx-book-theme"]
tests = [
"tree-sitter-html",
"tree-sitter-javascript",
"tree-sitter-json",
"tree-sitter-python",
"tree-sitter-rust",
"tree-sitter-html>=0.23.0",
"tree-sitter-javascript>=0.23.0",
"tree-sitter-json>=0.23.0",
"tree-sitter-python>=0.23.0",
"tree-sitter-rust>=0.23.0",
]

[tool.ruff]
Expand Down
7 changes: 3 additions & 4 deletions tests/test_language.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,8 @@ def test_eq(self):
self.assertNotEqual(Language(self.rust), Language(self.html))

def test_hash(self):
for name in ["html", "javascript", "json", "rust"]:
for name in ["html", "javascript", "json", "python", "rust"]:
with self.subTest(language=name):
ptr = getattr(self, name)
lang = Language(ptr)
lang = Language(getattr(self, name))
hash_ = hash(lang) & maxsize << 1
self.assertEqual(hash_, ptr)
self.assertGreater(hash_, 0)

0 comments on commit e164972

Please sign in to comment.