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

[Testing] Migrate completely to pytest #775

Open
abhinavsingh opened this issue Nov 22, 2021 · 1 comment
Open

[Testing] Migrate completely to pytest #775

abhinavsingh opened this issue Nov 22, 2021 · 1 comment
Labels
Good First Issue Issues for new contributors to pick-up Task Tasks & chores related to proxy.py

Comments

@abhinavsingh
Copy link
Owner

abhinavsingh commented Nov 22, 2021

Is your feature request related to a problem? Please describe.
Currently, a lot of testing code from unittest is mixed with pytest eco-system. We should migrate to pytest recommendations and give up unittest style tests.

Describe the solution you'd like

  • This includes abstracting out various fixtures so that they can be easily re-used across tests
  • Currently there is a lot of redundancy in tests which can be addressed using pytest.parameterize
  • fixtures will allow new contributors to easily understand and write new tests, instead of mocking 6-layer deep.

Ref discussions

@webknjaz
Copy link
Contributor

Pylint has a feature to forbid imports of one module and recommend another. You could add the following to .pylintrc:

[IMPORTS]
preferred-modules =
    unittest:pytest,

@abhinavsingh abhinavsingh added Task Tasks & chores related to proxy.py Good First Issue Issues for new contributors to pick-up and removed Enhancement labels Nov 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good First Issue Issues for new contributors to pick-up Task Tasks & chores related to proxy.py
Projects
None yet
Development

No branches or pull requests

2 participants