-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix precommit and coverage pipeline according to folder structure change
- Loading branch information
Showing
3 changed files
with
12 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ default_language_version: | |
python: python3 | ||
files: | | ||
(?x)^( | ||
dehb| | ||
src| | ||
tests | ||
)/.*\.py$ | ||
repos: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,27 @@ | ||
import importlib | ||
|
||
import pytest | ||
|
||
|
||
class TestImports(): | ||
"""This class bundles all import tests for the DEHB project. | ||
""" | ||
"""This class bundles all import tests for the DEHB project.""" | ||
def test_dehb_import(self): | ||
"""Test if DEHB can be imported properly. | ||
""" | ||
"""Test if DEHB can be imported properly.""" | ||
try: | ||
importlib.import_module("src.dehb.optimizers.dehb") | ||
except ImportError as e: | ||
assert False, f"Failed to import dehb: {e}" | ||
pytest.fail(f"Failed to import dehb: {e}") | ||
|
||
def test_de_import(self): | ||
"""Test if DE can be imported properly. | ||
""" | ||
"""Test if DE can be imported properly.""" | ||
try: | ||
importlib.import_module("src.dehb.optimizers.de") | ||
except ImportError as e: | ||
assert False, f"Failed to import de: {e}" | ||
pytest.fail(f"Failed to import de: {e}") | ||
|
||
def test_utils_import(self): | ||
"""Test if BracketManager can be imported properly. | ||
""" | ||
"""Test if BracketManager can be imported properly.""" | ||
try: | ||
importlib.import_module("src.dehb.utils") | ||
except ImportError as e: | ||
assert False, f"Failed to import dehb: {e}" | ||
pytest.fail(f"Failed to import utils: {e}") |