Skip to content

Commit

Permalink
tests: add typesafety tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ap-- committed Mar 31, 2024
1 parent 380144c commit 529b985
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ force_single_line = true
line_length = 88

[tool.pytest.ini_options]
addopts = "-ra -m 'not hdfs'"
addopts = "-ra -m 'not hdfs' -p no:pytest-mypy-plugins"
markers = [
"hdfs: mark test as hdfs",
"pathlib: mark cpython pathlib tests",
Expand All @@ -61,7 +61,7 @@ exclude_lines = [

[tool.mypy]
# Error output
show_column_numbers = true
show_column_numbers = false
show_error_codes = true
show_error_context = true
show_traceback = true
Expand Down
3 changes: 2 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ tests =
pytest-cov==4.1.0
pytest-mock==3.12.0
pylint==2.17.4
mypy==1.8.0
mypy==1.9.0
pytest-mypy-plugins==3.1.2
packaging
dev =
%(tests)s
Expand Down
6 changes: 6 additions & 0 deletions typesafety/test_upath_interface.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- case: upath_interface
disable_cache: true
main: |
from upath import UPath
reveal_type(UPath("abc")) # N: Revealed type is "upath.core.UPath"

0 comments on commit 529b985

Please sign in to comment.