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

Add prelim support for test-level markers #5517

Merged
merged 12 commits into from
May 23, 2024
Merged

Conversation

mlxd
Copy link
Member

@mlxd mlxd commented Apr 15, 2024

Before submitting

Please complete the following checklist when submitting a PR:

  • All new features must include a unit test.
    If you've fixed a bug or added code that should be tested, add a test to the
    test directory!

  • All new functions and code must be clearly commented and documented.
    If you do make documentation changes, make sure that the docs build and
    render correctly by running make docs.

  • Ensure that the test suite passes, by running make test.

  • Add a new entry to the doc/releases/changelog-dev.md file, summarizing the
    change, and including a link back to the PR.

  • The PennyLane source code conforms to
    PEP8 standards.
    We check all of our code against Pylint.
    To lint modified files, simply pip install pylint, and then
    run pylint pennylane/path/to/file.py.

When all the above are checked, delete everything above the dashed
line and fill in the pull request template.


Context: This PR introduces new test-level markers for PennyLane, which can begin use for indication of where interactions take-place in the given suite. This forms part of the work on improving testing across the packages
[sc-61416]

Description of the Change: Add 3 new test-level markers for pytest: unit_test, integration_test and system_test. Some sample tests that fit into the 3 categories are added for examination purposes.

Benefits: This will help us to structure our test-suite to better reflect localised tests from intermodule and interpackage tests.

Possible Drawbacks: 3 new markers to work with.

Related GitHub Issues:

Copy link

codecov bot commented Apr 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.67%. Comparing base (b7b4b75) to head (34a1836).
Report is 262 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5517      +/-   ##
==========================================
- Coverage   99.68%   99.67%   -0.01%     
==========================================
  Files         415      416       +1     
  Lines       38898    38745     -153     
==========================================
- Hits        38774    38620     -154     
- Misses        124      125       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

tests/pytest.ini Outdated Show resolved Hide resolved
@mlxd mlxd marked this pull request as ready for review May 17, 2024 14:19
@dwierichs dwierichs self-requested a review May 17, 2024 16:57
Copy link
Contributor

@dwierichs dwierichs left a comment

Choose a reason for hiding this comment

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

Had two small ideas :)

Otherwise looks good to me!

tests/numpy/test_numpy_wrapper.py Outdated Show resolved Hide resolved
tests/pytest.ini Outdated Show resolved Hide resolved
Copy link
Contributor

@PietropaoloFrisoni PietropaoloFrisoni left a comment

Choose a reason for hiding this comment

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

Thanks, @mlxd, this looks great. It is most probably going to be quite useful in the future

doc/releases/changelog-dev.md Outdated Show resolved Hide resolved
tests/pytest.ini Outdated Show resolved Hide resolved
mlxd and others added 3 commits May 21, 2024 13:39
@mlxd mlxd requested a review from dwierichs May 21, 2024 17:40
Copy link
Contributor

@dwierichs dwierichs left a comment

Choose a reason for hiding this comment

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

Thanks @mlxd 🎉 Looking forward to using them soon!

@mlxd mlxd enabled auto-merge (squash) May 23, 2024 19:33
@mlxd mlxd merged commit b05565e into master May 23, 2024
38 checks passed
@mlxd mlxd deleted the update/test_level_definitions branch May 23, 2024 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants