Attempted to improve TravisCI online tests

This commit is contained in:
Mads Marquart
2018-06-24 12:20:17 +02:00
parent da23ad5eb5
commit ead696cbad
2 changed files with 13 additions and 2 deletions

View File

@@ -2,7 +2,17 @@
set -ex set -ex
if ! python -m pytest --tb=no --color=yes; then # --tb=no -> Don't print stack traces if ! python -m pytest --color=yes; then
echo 'Some tests failed. Rerunning them, since they can be kinda flaky.' echo << EOF
-----------------------------------------------------------------
-----------------------------------------------------------------
-----------------------------------------------------------------
Some tests failed! Rerunning them, since they can be kinda flaky.
-----------------------------------------------------------------
-----------------------------------------------------------------
-----------------------------------------------------------------
EOF
python -m pytest --last-failed --color=yes python -m pytest --last-failed --color=yes
fi fi

View File

@@ -77,6 +77,7 @@ def load_client(n, cache):
client = Client( client = Client(
load_variable("client{}_email".format(n), cache), load_variable("client{}_email".format(n), cache),
load_variable("client{}_password".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), session_cookies=cache.get("client{}_session".format(n), None),
) )
yield client yield client