Skip to content

Modularize testing suite #278

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

Merged
merged 10 commits into from
Feb 12, 2025
Merged

Conversation

tylerhutcherson
Copy link
Collaborator

@tylerhutcherson tylerhutcherson commented Feb 12, 2025

This PR introduces a few improvements to our test suite to make it more modular.

  1. Adds the ability to run tests against specific file(s) using the poetry scripting:
poetry run test tests/unit/test_fields.py
  1. Adds the ability to toggle the API-enabled tests via command line arg using the poetry scripting
poetry run test-verbose --run-api-tests

OR

make test-all

This removes the need to set those ugly SKIP_VECTORIZER=true flags.

And run without the API dependencies:

poetry run test-verbose
make test
  1. Wraps notebook tests into a convenient poetry script and makefile wrapper:
poetry run test-notebooks

OR

make test-notebooks

@tylerhutcherson tylerhutcherson added enhancement New feature or request CI/CD labels Feb 12, 2025
@tylerhutcherson tylerhutcherson marked this pull request as ready for review February 12, 2025 17:23
@tylerhutcherson tylerhutcherson changed the title Add support for granular tests Modularize testing suite Feb 12, 2025
@@ -29,17 +30,25 @@ def check_mypy():


def test():
subprocess.run(["python", "-m", "pytest", "-n", "auto", "--log-level=CRITICAL"], check=True)
test_cmd = ["python", "-m", "pytest", "-n", "auto", "--log-level=CRITICAL"]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is nice because you can pass -n 0 to disable xdist and it'll override the earlier -n arg.

abrookins
abrookins previously approved these changes Feb 12, 2025
Copy link
Collaborator

@abrookins abrookins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of comments but LGTM!

abrookins
abrookins previously approved these changes Feb 12, 2025
Copy link
Collaborator

@rbs333 rbs333 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Collaborator

@bsbodden bsbodden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice improvements!

@tylerhutcherson tylerhutcherson merged commit f41581a into main Feb 12, 2025
36 checks passed
@tylerhutcherson tylerhutcherson deleted the feat/RAAE-625-support-granular-tests branch February 12, 2025 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/CD enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants