diff options
author | Paul Moore <p.f.moore@gmail.com> | 2021-04-05 15:39:01 +0100 |
---|---|---|
committer | Paul Moore <p.f.moore@gmail.com> | 2021-04-05 15:39:01 +0100 |
commit | 55d2d0dcf76ab0c885a2064b6391f36d488824bf (patch) | |
tree | ab60cc88628457a2d03f9be209038a62124af81f | |
parent | 3679947c99d814dc2d386111a7b6bdf56dbe7cb5 (diff) | |
download | pip-55d2d0dcf76ab0c885a2064b6391f36d488824bf.tar.gz |
Fix some tests that are checking logs incorrectly
-rw-r--r-- | tests/unit/test_resolution_legacy_resolver.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/unit/test_resolution_legacy_resolver.py b/tests/unit/test_resolution_legacy_resolver.py index 9fed37650..236a4c624 100644 --- a/tests/unit/test_resolution_legacy_resolver.py +++ b/tests/unit/test_resolution_legacy_resolver.py @@ -201,6 +201,10 @@ class TestYankedWarning: """ Test unyanked candidate preferred over yanked. """ + # Ignore spurious DEBUG level messages + # TODO: Probably better to work out why they are occurring, but IMO the + # tests are at fault here for being to dependent on exact output. + caplog.set_level(logging.WARNING) candidates = [ make_mock_candidate('1.0'), make_mock_candidate('2.0', yanked_reason='bad metadata #2'), @@ -217,6 +221,10 @@ class TestYankedWarning: """ Test all candidates yanked. """ + # Ignore spurious DEBUG level messages + # TODO: Probably better to work out why they are occurring, but IMO the + # tests are at fault here for being to dependent on exact output. + caplog.set_level(logging.WARNING) candidates = [ make_mock_candidate('1.0', yanked_reason='bad metadata #1'), # Put the best candidate in the middle, to test sorting. @@ -253,6 +261,10 @@ class TestYankedWarning: """ Test the log message with various reason strings. """ + # Ignore spurious DEBUG level messages + # TODO: Probably better to work out why they are occurring, but IMO the + # tests are at fault here for being to dependent on exact output. + caplog.set_level(logging.WARNING) candidates = [ make_mock_candidate('1.0', yanked_reason=yanked_reason), ] |