Skip to content

Commit 9d22ac4

Browse files
author
Adam Watkins
committed
⚗️ Add py.typed integration tests
1 parent 743eecc commit 9d22ac4

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

tests/test_integration/test_typing.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
import pathlib
22

33
file = pathlib.Path(__file__)
4-
package = file.parent.parent.parent / "fastapi_crudrouter"
4+
root_dir = file.parent.parent.parent
5+
package_src = root_dir / "fastapi_crudrouter"
56

67

78
def test_py_typed_file_exists():
8-
assert (package / "py.typed").exists()
9-
assert (package / "py.typed").is_file()
9+
assert (package_src / "py.typed").exists()
10+
assert (package_src / "py.typed").is_file()
1011

1112

1213
def test_virtualenv(virtualenv):
13-
assert (package).exists()
14+
assert (root_dir).exists()
15+
assert (root_dir / "setup.py").exists()
1416

15-
virtualenv.run(f"pip install -e {package}")
17+
virtualenv.run(f"pip install -e {root_dir}")
1618
virtualenv.run(f"pip install mypy")
1719
virtualenv.run(f"mypy {file}")
1820

0 commit comments

Comments
 (0)