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

Test Suite Housekeeping (Part 3) #1167

Merged
merged 13 commits into from
May 19, 2020
Merged

Test Suite Housekeeping (Part 3) #1167

merged 13 commits into from
May 19, 2020

Conversation

malefice
Copy link
Contributor

@malefice malefice commented Apr 28, 2020

Note: I estimate that only 1/3 of the transition is complete.

What does this change

Since Faker also now ships its own pytest plugin, this PR aims to (fully or partially) transition the test suite from using unittest style test to pytest style tests as well as to start using Faker's own fixtures in the test suite. This can also serve as a good opportunity to review the quality of individual tests, and improvements will be made whenever possible.

@malefice
Copy link
Contributor Author

@fcurella here is a first draft of the pytest transition we discussed in #1162. I would like to hear your thoughts and any suggestion you may have before I proceed with the rest.

Copy link
Collaborator

@fcurella fcurella left a comment

Choose a reason for hiding this comment

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

Just a minor issue with a bare except that I'd like to avoid, but overall looks really good! Thank you so much!

tests/providers/conftest.py Outdated Show resolved Hide resolved
@malefice
Copy link
Contributor Author

@fcurella I think travis hanged since the last merge to master. Anyway, looks like I might be rebasing my PR a fair amount prior to getting this merged if I do not split this now, so I will probably wrap this part up soon and continue with a new PR.

@malefice malefice changed the title WIP: Test Suite Housekeeping (Part 3) Test Suite Housekeeping (Part 3) May 18, 2020
@malefice
Copy link
Contributor Author

@fcurella I am done for this portion which (I estimate) accounts for 1/3 of the transition. The tests for other providers are a bit tedious/repetitive/lacking, so I am going to think about how to tackle them, and I also do not want to introduce too much pytest magic into the test suite. Anyway, for now, can you please review my work?

@fcurella
Copy link
Collaborator

@malefice It looks great! Impressive work!

@fcurella fcurella merged commit fca4fe9 into joke2k:master May 19, 2020
IlfirinPL pushed a commit to IlfirinPL/faker that referenced this pull request Apr 9, 2021
* Add test fixtures exclusive for tests.providers

* Pytestify tests.sphinx

* Pytestify and improve user agent provider tests

* Pytestify barcode provider tests

* Fix flake8 bare except issue

* Pytestify, reorganize, and improve Generator class tests

* Pytestify, reorganize, and improve Faker class tests

* Fix test failure

* Pytestify currency provider tests

* Pytestify isbn provider tests

* Pytestify, reorganize, and improve internet provider tests

* Pytestify, reorganize, and improve base provider tests

* Fix CI errors
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