Skip to content

Commit ec8e172

Browse files
committed
For the test time-limit feature, start the clock at the end of setUp()
1 parent e1190ad commit ec8e172

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

seleniumbase/fixtures/base_case.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4955,12 +4955,6 @@ def setUp(self, masterqa_mode=False):
49554955
""" >>> "pip install -r requirements.txt"\n"""
49564956
""" >>> "python setup.py install" """)
49574957

4958-
# Configure the test time limit (if used)
4959-
self.set_time_limit(self.time_limit)
4960-
4961-
# Set the start time for the test (in ms)
4962-
sb_config.start_time_ms = int(time.time() * 1000.0)
4963-
49644958
# Parse the settings file
49654959
if self.settings_file:
49664960
settings_parser.set_settings(self.settings_file)
@@ -5049,6 +5043,14 @@ def setUp(self, masterqa_mode=False):
50495043
if self._reuse_session:
50505044
sb_config.shared_driver = self.driver
50515045

5046+
# Configure the test time limit (if used).
5047+
self.set_time_limit(self.time_limit)
5048+
5049+
# Set the start time for the test (in ms).
5050+
# Although the pytest clock starts before setUp() begins,
5051+
# the time-limit clock starts at the end of the setUp() method.
5052+
sb_config.start_time_ms = int(time.time() * 1000.0)
5053+
50525054
def __set_last_page_screenshot(self):
50535055
""" self.__last_page_screenshot is only for pytest html report logs
50545056
self.__last_page_screenshot_png is for all screenshot log files """

0 commit comments

Comments
 (0)