Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test imports #122

Merged
merged 2 commits into from
Aug 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ jobs:
working_directory: /build
command: ninja install

- run:
name: test imports
working_directory: /source/pyvxl
command: ./test/test_import.bsh

- run:
name: test
working_directory: /source/pyvxl
Expand Down
2 changes: 1 addition & 1 deletion contrib/bpgl/algo/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
from vxl import vgl, vil, vpgl
from ._bpgl_algo import *
from vxl import vil
29 changes: 29 additions & 0 deletions test/test_import.bsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env bash
# test independent import of each python module

# fail quickly
set -eu

# modules to test
MODULE_NAMES=(
"vxl"
"vxl.vbl"
"vxl.vgl" "vxl.vgl.algo"
"vxl.vil"
"vxl.vnl"
"vxl.vpgl" "vxl.vpgl.algo"
"vxl.contrib"
"vxl.contrib.acal"
"vxl.contrib.bpgl" "vxl.contrib.bpgl.algo"
"vxl.contrib.brad"
"vxl.contrib.brip"
"vxl.contrib.bsgm"
"vxl.contrib.bvxm" "vxl.contrib.bvxm.algo"
"vxl.contrib.sdet" "vxl.contrib.sdet.algo"
)

# independent import of each python module
for module_name in "${MODULE_NAMES[@]}"; do
echo "test: \"import ${module_name}\""
python3 -c "import ${module_name}"
done