Skip to content

Commit 6e7efe7

Browse files
committed
test: add import test
1 parent c60d18b commit 6e7efe7

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ jobs:
3333
run: |
3434
make check-codestyle
3535
36-
# - name: Run tests
37-
# run: |
38-
# make test
36+
- name: Run tests
37+
run: |
38+
make test
3939
4040
# - name: Run safety checks
4141
# run: |

tests/test_import.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import importlib
2+
import pkgutil
3+
4+
import pytest
5+
6+
7+
def test_imports():
8+
try:
9+
package = importlib.import_module('parea')
10+
for _, module_name, _ in pkgutil.iter_modules(package.__path__):
11+
importlib.import_module(f'parea.{module_name}')
12+
except ImportError:
13+
pytest.fail("Import failed", pytrace=False)

0 commit comments

Comments
 (0)