From ead696cbadc72f3b08fd5c091962bc5fbc27c384 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Sun, 24 Jun 2018 12:20:17 +0200 Subject: [PATCH] Attempted to improve TravisCI online tests --- scripts/travis-online | 14 ++++++++++++-- tests/utils.py | 1 + 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/scripts/travis-online b/scripts/travis-online index eb30852..ab4737f 100755 --- a/scripts/travis-online +++ b/scripts/travis-online @@ -2,7 +2,17 @@ set -ex -if ! python -m pytest --tb=no --color=yes; then # --tb=no -> Don't print stack traces - echo 'Some tests failed. Rerunning them, since they can be kinda flaky.' +if ! python -m pytest --color=yes; then + echo << EOF +----------------------------------------------------------------- +----------------------------------------------------------------- +----------------------------------------------------------------- + +Some tests failed! Rerunning them, since they can be kinda flaky. + +----------------------------------------------------------------- +----------------------------------------------------------------- +----------------------------------------------------------------- +EOF python -m pytest --last-failed --color=yes fi diff --git a/tests/utils.py b/tests/utils.py index 741f798..0da1571 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -77,6 +77,7 @@ def load_client(n, cache): client = Client( load_variable("client{}_email".format(n), cache), load_variable("client{}_password".format(n), cache), + user_agent='Mozilla/5.0 (Windows NT 6.3; WOW64; ; NCT50_AAP285C84A1328) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.90 Safari/537.36', session_cookies=cache.get("client{}_session".format(n), None), ) yield client