Skip to content

Update test runner to use pytest#495

Merged
pganssle merged 2 commits into
dateutil:masterfrom
pganssle:add_pytest
Nov 5, 2017
Merged

Update test runner to use pytest#495
pganssle merged 2 commits into
dateutil:masterfrom
pganssle:add_pytest

Conversation

@pganssle

@pganssle pganssle commented Nov 5, 2017

Copy link
Copy Markdown
Member

This changes the test runner over to pytest.

@pganssle pganssle added the tests label Nov 5, 2017
@pganssle pganssle added this to the 2.7.0 milestone Nov 5, 2017
@pganssle

pganssle commented Nov 5, 2017

Copy link
Copy Markdown
Member Author

@jbrockmendel @mariocj89 I think this is fine, any comments? I'd like to merge ASAP so that everyone else can start using pytest.

@mariocj89

Copy link
Copy Markdown
Member

Looks great! I'd personally add a -vvvv for pytest to get the history of test run on the builds

@pganssle

pganssle commented Nov 5, 2017

Copy link
Copy Markdown
Member Author

@mariocj89 Ah, good call, I didn't notice that that was missing.

@pganssle

pganssle commented Nov 5, 2017

Copy link
Copy Markdown
Member Author

What is the difference between -v and -vvvv?

@mariocj89

Copy link
Copy Markdown
Member

Just realized, it actually changes the way some diffs are reported.

-v will add the test name in the reports. having multiple v just increases the level of verbosity, which adds extra information on some assertion failures.

Example, if you assert two diffs which are different but big, adding extra verbosity will print the whole dict whilst just -v won't.
You are probably fine with just -v here

@pganssle

pganssle commented Nov 5, 2017

Copy link
Copy Markdown
Member Author

OK, we can change it later if -vvv is better.

@pganssle
pganssle merged commit 11f47be into dateutil:master Nov 5, 2017
Comment thread .travis.yml

script:
- coverage run --omit=setup.py,dateutil/test/* setup.py test
- coverage run --omit=setup.py,dateutil/test/* -m pytest -v

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

There is a pytest-cov plugin, not sure to what extent there is a "preferred" usage of that vs this usage.

@jbrockmendel

Copy link
Copy Markdown
Contributor

Little late, but LGTM.

@pganssle pganssle mentioned this pull request Mar 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants