Skip to content

Commit

Permalink
Fix tests, bump dev-requirements as well
Browse files Browse the repository at this point in the history
  • Loading branch information
emdoyle committed Nov 26, 2024
1 parent 9b028fd commit e4f0c7a
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 17 deletions.
2 changes: 1 addition & 1 deletion dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ pip==24.0
pytest==8.2.2
pyright==1.1.377
ruff==0.4.1
tach==0.14.3
tach==0.15.4
# LSP
pygls==1.3.1
nox==2024.4.15
Expand Down
2 changes: 1 addition & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def setup(session: nox.Session) -> None:
def tests(session: nox.Session) -> None:
"""Runs all the tests for the extension."""
session.install("-r", "src/test/python_tests/requirements.txt")
session.run("pytest", "src/test/python_tests")
session.run("pytest", "-svv", "src/test/python_tests")


@nox.session()
Expand Down
20 changes: 16 additions & 4 deletions src/test/python_tests/test_data/tach.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
modules = [
{ path = "sample1", depends_on = [], strict = true },
{ path = "sample2", depends_on = [] },
]
exclude = [
"docs",
"tests",
Expand All @@ -10,3 +6,19 @@ source_roots = [
".",
]
ignore_type_checking_imports = false

[[modules]]
path = "sample1"
depends_on = []

[[modules]]
path = "sample2"
depends_on = [
{ path = "sample1" }
]

[[interfaces]]
expose = []
from = [
"sample1",
]
12 changes: 1 addition & 11 deletions src/test/python_tests/test_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,7 @@
"uri": utils.as_uri(
str(constants.TEST_DATA / "sample2" / "sample2.py")
),
"diagnostics": [
{
"range": {
"start": {"line": 2, "character": 0},
"end": {"line": 2, "character": 99999},
},
"message": "Module 'sample1' is in strict mode. Only imports from the public interface of this module are allowed. The import 'sample1.sample.SAMPLE1' (in module 'sample2') is not included in __all__.",
"severity": 1,
"source": "tach",
}
],
"diagnostics": [],
},
),
],
Expand Down

0 comments on commit e4f0c7a

Please sign in to comment.