From f93e021bc87c17528e0c1aaebceea178b22b7470 Mon Sep 17 00:00:00 2001 From: Ran Benita <ran@unusedvar.com> Date: Wed, 27 May 2020 13:04:56 +0300 Subject: [PATCH] capture: remove some unclear parametrization from a test The two cases end up doing the same (the tmpfile fixture isn't used except being truthy). --- testing/test_capture.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/testing/test_capture.py b/testing/test_capture.py index 95f2d748a..1301a0e69 100644 --- a/testing/test_capture.py +++ b/testing/test_capture.py @@ -1255,11 +1255,8 @@ def test_capsys_results_accessible_by_attribute(capsys): assert capture_result.err == "eggs" -@pytest.mark.parametrize("use", [True, False]) -def test_fdcapture_tmpfile_remains_the_same(tmpfile, use): - if not use: - tmpfile = True - cap = StdCaptureFD(out=False, err=tmpfile) +def test_fdcapture_tmpfile_remains_the_same() -> None: + cap = StdCaptureFD(out=False, err=True) try: cap.start_capturing() capfile = cap.err.tmpfile