| 100 | # Might fail on Windows due to interference from other warnings. |
| 101 | @pytest.mark.xfail |
| 102 | def test_quiet_on_python_warnings(self, test_patch, httpbin, flags, expected_warnings): |
| 103 | def warn_and_run(*args, **kwargs): |
| 104 | warnings.warn('warning!!') |
| 105 | return ExitStatus.SUCCESS |
| 106 | |
| 107 | test_patch.side_effect = warn_and_run |
| 108 | with pytest.warns(None) as record: |
| 109 | http(*flags, httpbin + '/get') |
| 110 | |
| 111 | assert len(record) == expected_warnings |
| 112 | |
| 113 | def test_double_quiet_on_error(self, httpbin): |
| 114 | r = http( |