Skip to content

Commit

Permalink
add integration test for package import (#218)
Browse files Browse the repository at this point in the history
  • Loading branch information
zargot authored Jan 2, 2024
1 parent 044b4b2 commit f14cc2c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
6 changes: 6 additions & 0 deletions inttests/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
This directory holds all integration tests. The tests are mainly to be run by
CI, but can also be run manually.

The main reason for having integration tests is to make sure that the package
can be imported and used as intended, something that can't be verified with
unit-tests alone.
19 changes: 19 additions & 0 deletions inttests/test_import.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

# XXX: must be run with lowest required python version (as specified in
# pyproject.toml), to ensure compatibility

set -ex

[[ "$(python --version)" == "Python 3.8."* ]]

repo=$(dirname $(realpath $0))/..
url="git+file://$repo"
dir=$(mktemp -d)

cd $dir
python -m venv .env
source .env/bin/activate

pip install $url
python -c "from odm_validation.validation import validate_data"

0 comments on commit f14cc2c

Please sign in to comment.