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

Allow pytest native tests #563

Merged
merged 6 commits into from
Nov 24, 2021
Merged

Allow pytest native tests #563

merged 6 commits into from
Nov 24, 2021

Conversation

zhiltsov-max
Copy link
Contributor

Summary

Pytest offers lots of interesting features, including fixtures and test marking. Fixtures, specifically, can be used to better manage test resources and speed-up tests.

  • Allowed test lookup by name
  • Test classes are not required to be inherited from TestCase anymore (though, they can be)
  • Tests can be expressed by free functions outside classes
  • Dropped unittest support
  • datumaro.utils.test_utils.test_save_and_load renamed no to be confused with a test

How to test

Checklist

License

  • I submit my code changes under the same MIT License that covers the project.
    Feel free to contact the maintainers if that's a concern.
  • I have updated the license header for each file (see an example below)
# Copyright (C) 2021 Intel Corporation
#
# SPDX-License-Identifier: MIT

Comment on lines +29 to +30
- Allowed Pytest-native tests
(<https://github.com/openvinotoolkit/datumaro/pull/563>)
Copy link

Choose a reason for hiding this comment

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

I'm not sure this needs to be in the changelog, since it's not a user-facing change. Up to you, though.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll remove it from release notes, but it looks as important for developers. Need to think about this again.

@zhiltsov-max zhiltsov-max merged commit 8a65a90 into develop Nov 24, 2021
@zhiltsov-max zhiltsov-max deleted the zm/update-pytest-config branch November 24, 2021 11:38
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.

2 participants