Skip to content

Commit

Permalink
Compile in test mode only if TEST env variable set to true
Browse files Browse the repository at this point in the history
  • Loading branch information
insolor committed Sep 19, 2023
1 parent 67417c5 commit 816cd1d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ jobs:
python -m pip install --upgrade pip setuptools cython wheel pytest pytest-cov
- name: "Build DAWG for ${{ matrix.python-version }}"
env:
TEST: true
run: |
python setup.py build_ext --inplace
Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
from Cython.Build import cythonize
from setuptools import Extension, setup

os.environ["TEST"] = "TRUE"
TEST = bool(os.environ.get("TEST", False))
TEST = os.environ.get("TEST", "false").casefold() == "true"

compiler_directives = {"language_level": 3}
define_macros = []
Expand Down

0 comments on commit 816cd1d

Please sign in to comment.