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 pytest.markers to pyproject.toml #5388

Merged
merged 5 commits into from
Oct 5, 2022

Conversation

jerempy
Copy link
Contributor

@jerempy jerempy commented Oct 3, 2022

Thank you for contributing to Pipenv!

The issue

This is to help silence most of the warnings when running pytest. Some test files when run individually would yield 70+ warnings about unreigstered custom pytest.marks.

https://github.com/pypa/pipenv/blob/master/peeps/PEEP-000.md

The fix

I registered them in the pyproject.toml per this: https://docs.pytest.org/en/stable/how-to/mark.html

I gave them a description as best as I could tell from what the tests were doing.

I didn't include all, but most of them. I left out ones that there were only a couple of.
running pipenv run pytest --markers
will yield (in addition to the baked in markers):

@pytest.mark.install: tests having to do with `pipenv install`
@pytest.mark.needs_internet: integration tests that require internet to pass
@pytest.mark.basic: basic pipenv tests grouping
@pytest.mark.dev: tests having to do with dev and dev packages
@pytest.mark.system: related or interacting with the os
@pytest.mark.utils: grouping of pipenv utility functions
@pytest.mark.cli: test grouping that relate to command line like `pipenv --flag args`
@pytest.mark.requirements: tests that save and alter pip requirements
@pytest.mark.run: tests that run or execute python through pipenv
@pytest.mark.script: grouping of tests that execute scripts
@pytest.mark.keep_outdated: when an activity is supposed to keep something out of date
@pytest.mark.lock: tests that interact with pipenv lock
@pytest.mark.markers: pipenv environment markers
@pytest.mark.vcs: tests integration with pipenv and vertsion control systems
@pytest.mark.project: tests with the project object
@pytest.mark.sync: related to `pipenv sync`
@pytest.mark.rrule: relating to rrules (as in recurring time)
@pytest.mark.tzoffset: timezone offset
@pytest.mark.gettz: tests with gettz (get timezone) from dateutil lib
@pytest.mark.tzstr: timezone string
@pytest.mark.extras:
@pytest.mark.extended:
@pytest.mark.ext: extra non-categorized tests

The checklist

  • Associated issue
  • A news fragment in the news/ directory to describe this fix with the extension .bugfix.rst, .feature.rst, .behavior.rst, .doc.rst. .vendor.rst. or .trivial.rst (this will appear in the release changelog). Use semantic line breaks and name the file after the issue number or the PR #.

to help silence most of the warnings when running pytest
Copy link
Contributor

@oz123 oz123 left a comment

Choose a reason for hiding this comment

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

Can you please add a news fragment?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants