Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DO NOT MERGE if AVL Trees is merged] CI Job with only benchmark tests #565

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:

- name: Run tests
run: |
python -c "import pydatastructs; pydatastructs.test(include_benchmarks=True)"
python -c "import pydatastructs; pydatastructs.test(only_benchmarks=True)"

- name: Build Documentation
run: |
Expand Down
12 changes: 7 additions & 5 deletions pydatastructs/utils/testing_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

SKIP_FILES = ['testing_util.py']

def test(submodules=None, include_benchmarks=False,
def test(submodules=None, only_benchmarks=False,
benchmarks_size=1000, **kwargs):
"""
Runs the library tests using pytest
Expand Down Expand Up @@ -52,11 +52,12 @@ def test(submodules=None, include_benchmarks=False,
else:
raise Exception("Submodule should be of type: str or module")
if sub in path:
if not include_benchmarks:
if not only_benchmarks:
if not 'benchmarks' in path:
test_files.append(path)
else:
test_files.append(path)
if 'benchmarks' in path:
test_files.append(path)
break
else:
for path in glob.glob(f'{ROOT_DIR}/**/test_*.py', recursive=True):
Expand All @@ -67,11 +68,12 @@ def test(submodules=None, include_benchmarks=False,
break
if skip_test:
continue
if not include_benchmarks:
if not only_benchmarks:
if not 'benchmarks' in path:
test_files.append(path)
else:
test_files.append(path)
if 'benchmarks' in path:
test_files.append(path)

extra_args = []
if not kwargs.get("n", False) is False:
Expand Down
Loading