Skip to content

Commit

Permalink
Merge pull request #122 from VisionSystemsInc/test_import
Browse files Browse the repository at this point in the history
test imports
  • Loading branch information
drewgilliam authored Aug 17, 2021
2 parents 83cb0d7 + 1bdb2aa commit b4587de
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
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

0 comments on commit b4587de

Please sign in to comment.