Skip to content

Commit 7fa11f3

Browse files
committed
Run ABI version check inside tests/
1 parent aa7ddea commit 7fa11f3

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

.github/workflows/npyodbc_tests.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,11 @@ jobs:
4141
pip install 'numpy<2'
4242
4343
# Ensure we are testing with npyodbc compiled against numpy>=2.
44-
# Don't prepend the current working directory, it will inadvertently try to import
45-
# the local npyodbc code which doesn't have the compiled extension
46-
python -P -c 'import npyodbc; assert npyodbc.numpy_abi_version >= 0x2000000'
44+
# Run this somewhere besides the current working directory, because python will
45+
# inadvertently try to import the local npyodbc code which doesn't have the compiled
46+
# extension otherwise. After 3.10 support is dropped, we can just use the -P flag instead
47+
# but for now...
48+
pushd tests/
49+
python -c 'import npyodbc; assert npyodbc.numpy_abi_version >= 0x2000000'
50+
popd
4751
pytest tests/test_numpy.py

0 commit comments

Comments
 (0)