Commit 1c8e20b6cf70af7872259f5eda940b8078bccaf1
1 parent
4490c825
更新Mysessison的mark方法让它支持单字符串和列表,如下:
@unittest.case_mark(my.mark("沈阳")) 或 @unittest.case_mark(my.mark(["P1","heb","v1.0","沈阳"]))
Showing
1 changed file
with
5 additions
and
3 deletions
commons/MySession.py
@@ -270,7 +270,7 @@ class mysession(): | @@ -270,7 +270,7 @@ class mysession(): | ||
270 | if _global_mark == False: | 270 | if _global_mark == False: |
271 | return True | 271 | return True |
272 | # 输入预设值且未标记用例,默认跑全部 | 272 | # 输入预设值且未标记用例,默认跑全部 |
273 | - elif _global_mark != False and (m in _global_mark): | 273 | + elif _global_mark != False and (m in _global_mark) or len([tag for tag in m if tag in _global_mark]) >0: |
274 | return True | 274 | return True |
275 | else: | 275 | else: |
276 | return False | 276 | return False |
@@ -285,5 +285,7 @@ s1 = my.get_session_client("sg_user01") | @@ -285,5 +285,7 @@ s1 = my.get_session_client("sg_user01") | ||
285 | s2 = my.get_session_client("sg_user02") | 285 | s2 = my.get_session_client("sg_user02") |
286 | s3 = my.get_session_client("sg_user01") | 286 | s3 = my.get_session_client("sg_user01") |
287 | # s3= my.get_session_client("sg_user02") | 287 | # s3= my.get_session_client("sg_user02") |
288 | -# sg=my.get_session_client("sg_user01") | ||
289 | -# sy=my.get_session_client("sy_user01") | ||
290 | \ No newline at end of file | 288 | \ No newline at end of file |
289 | +# sg01=my.get_session_client("sg_user01") | ||
290 | +# sg02=my.get_session_client("sg_user02") | ||
291 | +# sy=my.get_session_client("sy_user01") | ||
292 | + |