SIMNet/tests/test_setup.py
洛水居室 009f74839f
Add support for TEST_BUILD environment variable
In the `test_build` function, added support for the TEST_BUILD environment variable. Now, if the variable is set to True, the `test_build` function will run; otherwise, it will skip the test and output a related message. Additionally, introduced a new pytest fixture `if_test_build` to check if the test is enabled.
2023-05-09 16:20:56 +08:00

10 lines
201 B
Python

import os
import pytest
def test_build(if_test_build: bool):
if not if_test_build:
pytest.skip("TEST_BUILD not enabled")
assert os.system("python setup.py") == 0 # pragma: no cover