Skip to content

Commit

Permalink
Fix CI errors. pytest 5.0.0 requires str(e.value) & works in older ve…
Browse files Browse the repository at this point in the history
…rsions -autopull
  • Loading branch information
makyen committed Jun 29, 2019
1 parent 104e3d5 commit 0e3794d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/test_chatcommunicate.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def test_init(room_config, client_constructor, thread):
# https://stackoverflow.com/questions/23337471/
with pytest.raises(Exception) as e:
chatcommunicate.init("shoutouts", "to simpleflips", try_cookies=False)
assert str(e).endswith("Failed to log into {}, max retries exceeded".format(next(iter(chatcommunicate._clients))))
assert str(e.value).endswith("Failed to log into {}, max retries exceeded".format(next(iter(chatcommunicate._clients))))

client.login.side_effect = None
client.login.reset_mock()
Expand Down
2 changes: 1 addition & 1 deletion test/test_datahandling.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def test_smokey_transfer(monkeypatch):

with pytest.raises(ValueError) as e:
SmokeyTransfer.load("hahaha")
assert "invalid data" in str(e).lower()
assert "invalid data" in str(e.value).lower()

with pytest.raises(ValueError):
SmokeyTransfer.load(SmokeyTransfer.HEADER + "\nmmmmmm\n" + SmokeyTransfer.ENDING)

0 comments on commit 0e3794d

Please sign in to comment.