Skip to content

Commit

Permalink
Merge pull request #85 from airtower-luna/manual-test-browser
Browse files Browse the repository at this point in the history
test.py: Add flag to start browser for manual test
  • Loading branch information
airtower-luna authored Nov 8, 2022
2 parents 4ff40d7 + e1542e5 commit 55e0ed6
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions test.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,13 @@ def testDeactivate(self):
import argparse
parser = argparse.ArgumentParser(
description='Run referer-mod tests')
parser.add_argument('--no-quit', action='store_false',
dest='quit_browser',
help='don\'t stop browser instances after tests')
parser.add_argument(
'--no-quit', action='store_false', dest='quit_browser',
help='don\'t stop browser instances after tests')
parser.add_argument(
'--manual', action='store_true',
help='instead of running automated tests, start a browser instance '
'with identical setup for manual tests')

# enable bash completion if argcomplete is available
try:
Expand All @@ -227,4 +231,7 @@ def testDeactivate(self):
args, argv = parser.parse_known_args()
RefModTest.quit_browser = args.quit_browser

unittest.main(verbosity=2, argv=sys.argv[:1] + argv)
if args.manual:
RefModTest().setUpClass()
else:
unittest.main(verbosity=2, argv=sys.argv[:1] + argv)

0 comments on commit 55e0ed6

Please sign in to comment.