Skip to content

Commit b83c618

Browse files
committed
Make updates for pynose compatibility
1 parent cffb6e0 commit b83c618

File tree

2 files changed

+13
-15
lines changed

2 files changed

+13
-15
lines changed

seleniumbase/plugins/base_plugin.py

+12-15
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,6 @@ def configure(self, options, conf):
208208
self.duration = float(0)
209209
self.page_results_list = []
210210
self.test_count = 0
211-
self.import_error = False
212211
log_path = constants.Logs.LATEST + "/"
213212
archive_logs = options.archive_logs
214213
log_helper.log_folder_setup(log_path, archive_logs)
@@ -238,6 +237,7 @@ def beforeTest(self, test):
238237
)
239238
else:
240239
variables = {}
240+
test.test.test_id = test.id()
241241
test.test.is_nosetest = True
242242
test.test.environment = self.options.environment
243243
test.test.env = self.options.environment # Add a shortened version
@@ -263,17 +263,16 @@ def finalize(self, result):
263263
)
264264
log_helper.clear_empty_logs()
265265
if self.report_on:
266-
if not self.import_error:
267-
report_helper.add_bad_page_log_file(self.page_results_list)
268-
report_log_path = report_helper.archive_new_report_logs()
269-
report_helper.build_report(
270-
report_log_path,
271-
self.page_results_list,
272-
self.successes,
273-
self.failures,
274-
self.options.browser,
275-
self.show_report,
276-
)
266+
report_helper.add_bad_page_log_file(self.page_results_list)
267+
report_log_path = report_helper.archive_new_report_logs()
268+
report_helper.build_report(
269+
report_log_path,
270+
self.page_results_list,
271+
self.successes,
272+
self.failures,
273+
self.options.browser,
274+
self.show_report,
275+
)
277276

278277
def addSuccess(self, test, capt):
279278
if self.report_on:
@@ -293,9 +292,6 @@ def add_fails_or_errors(self, test, err):
293292
"%.2fs" % (float(time.time()) - float(self.start_time))
294293
)
295294
if test.id() == "nose.failure.Failure.runTest":
296-
print(">>> ERROR: Could not locate tests to run!")
297-
print(">>> The Test Report WILL NOT be generated!")
298-
self.import_error = True
299295
return
300296
self.failures.append(test.id())
301297
self.page_results_list.append(
@@ -314,6 +310,7 @@ def add_fails_or_errors(self, test, err):
314310
test._log_fail_data()
315311
sb_config._excinfo_tb = err
316312
log_path = None
313+
source = None
317314
if hasattr(sb_config, "_test_logpath"):
318315
log_path = sb_config._test_logpath
319316
if hasattr(sb_config, "_last_page_source"):

seleniumbase/plugins/selenium_plugin.py

+1
Original file line numberDiff line numberDiff line change
@@ -1309,6 +1309,7 @@ def beforeTest(self, test):
13091309
test.test.dashboard = False
13101310
test.test._multithreaded = False
13111311
test.test._reuse_session = False
1312+
sb_config.recorder_mode = test.test.recorder_mode
13121313
sb_config.no_screenshot = test.test.no_screenshot_after_test
13131314
if test.test.servername != "localhost":
13141315
# Using Selenium Grid

0 commit comments

Comments
 (0)