@@ -14048,17 +14048,21 @@ def __get_test_id(self):
14048
14048
if self._sb_test_identifier and len(str(self._sb_test_identifier)) > 6:
14049
14049
test_id = self._sb_test_identifier
14050
14050
test_id = test_id.replace(".py::", ".").replace("::", ".")
14051
- test_id = test_id.replace("/", ".")
14051
+ test_id = test_id.replace("/", ".").replace(" ", "_")
14052
14052
elif hasattr(self, "_using_sb_fixture") and self._using_sb_fixture:
14053
14053
test_id = sb_config._latest_display_id
14054
14054
test_id = test_id.replace(".py::", ".").replace("::", ".")
14055
- test_id = test_id.replace("/", ".")
14055
+ test_id = test_id.replace("/", ".").replace(" ", "_")
14056
14056
return test_id
14057
14057
14058
14058
def __get_test_id_2(self):
14059
14059
"""The id for SeleniumBase Dashboard entries."""
14060
14060
if "PYTEST_CURRENT_TEST" in os.environ:
14061
- return os.environ["PYTEST_CURRENT_TEST"].split(" ")[0]
14061
+ full_name = os.environ["PYTEST_CURRENT_TEST"]
14062
+ if "] " in full_name:
14063
+ return full_name.split("] ")[0] + "]"
14064
+ else:
14065
+ return full_name.split(" ")[0]
14062
14066
if hasattr(self, "is_behave") and self.is_behave:
14063
14067
return self.__get_test_id()
14064
14068
test_id = "%s.%s.%s" % (
@@ -14075,7 +14079,11 @@ def __get_test_id_2(self):
14075
14079
def __get_display_id(self):
14076
14080
"""The id for running a test from pytest. (Displayed on Dashboard)"""
14077
14081
if "PYTEST_CURRENT_TEST" in os.environ:
14078
- return os.environ["PYTEST_CURRENT_TEST"].split(" ")[0]
14082
+ full_name = os.environ["PYTEST_CURRENT_TEST"]
14083
+ if "] " in full_name:
14084
+ return full_name.split("] ")[0] + "]"
14085
+ else:
14086
+ return full_name.split(" ")[0]
14079
14087
if hasattr(self, "is_behave") and self.is_behave:
14080
14088
file_name = sb_config.behave_scenario.filename
14081
14089
line_num = sb_config.behave_line_num
@@ -14222,6 +14230,7 @@ def __process_dashboard(self, has_exception, init=False):
14222
14230
alt_test_id = sb_config._display_id[test_id]
14223
14231
alt_test_id = alt_test_id.replace(".py::", ".")
14224
14232
alt_test_id = alt_test_id.replace("::", ".")
14233
+ alt_test_id = alt_test_id.replace(" ", "_")
14225
14234
if alt_test_id in sb_config._results.keys():
14226
14235
sb_config._results.pop(alt_test_id)
14227
14236
if test_id in sb_config._results.keys() and (
0 commit comments