Commit 2299e11c authored by asksven's avatar asksven

Fixed tests to return 1 when failing

parent eb0a690c
Pipeline #158513350 failed with stages
in 2 minutes and 10 seconds
import os
import sys
import unittest
from selenium import webdriver
from selenium.common.exceptions import NoSuchElementException
......@@ -55,6 +56,7 @@ class TestTemplate(unittest.TestCase):
except NoSuchElementException as ex:
self.fail(ex.msg)
def test_case_3(self):
"""Find and click github link"""
try:
......@@ -78,6 +80,9 @@ class TestTemplate(unittest.TestCase):
except NoSuchElementException as ex:
self.fail(ex.msg)
if __name__ == '__main__':
suite = unittest.TestLoader().loadTestsFromTestCase(TestTemplate)
unittest.TextTestRunner(verbosity=2).run(suite)
\ No newline at end of file
runner = unittest.TextTestRunner(verbosity=2, failfast=True)
ret = not runner.run(suite).wasSuccessful()
sys.exit(ret)
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment