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

use a fixture to test brent and newton to eliminate redundant tests in test_pvsystem #499

Closed
mikofski opened this issue Jun 30, 2018 · 0 comments

Comments

@mikofski
Copy link
Member

problem
there is WET code in test_pvsystem.py since I copied and pasted the same tests, and just changed the method

solution
according to this comment here's a nice snippet:

@requires_scipy
@pytest.mark.parametrize('method,atol', [('brentq', 1e-11), ('newton', 1e-8)])
def test_v_from_i_methods(fixture_v_from_i, method, atol):
# remove atol spec and set method=method

Additional context
see #409

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

No branches or pull requests

1 participant