Fix broken test for webbrowser internals

List may be empty if running in minimal environment.
This commit is contained in:
Markus Unterwaditzer 2016-03-13 20:37:42 +01:00
parent d8854294e1
commit 0e7fa2ed62

View file

@ -83,9 +83,9 @@ def test_request_ssl_fingerprints(httpsserver, fingerprint):
def test_open_graphical_browser(monkeypatch):
import webbrowser
# Just assert that this internal attribute still exists,is some sort of
# collection and non-empty
assert len(webbrowser._tryorder)
# Just assert that this internal attribute still exists and is some sort of
# collection.
iter(webbrowser._tryorder)
monkeypatch.setattr('webbrowser._tryorder', [])