qase-python-commons 3.2.3__py3-none-any.whl → 3.2.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of qase-python-commons might be problematic. Click here for more details.

qase/commons/config.py CHANGED
@@ -145,6 +145,19 @@ class ConfigManager:
145
145
  pytest.get("captureLogs")
146
146
  )
147
147
 
148
+ if pytest.get("xfailStatus"):
149
+ xfail_status = pytest.get("xfailStatus")
150
+
151
+ if xfail_status.get("xfail"):
152
+ self.config.framework.pytest.xfail_status.set_xfail(
153
+ xfail_status.get("xfail")
154
+ )
155
+
156
+ if xfail_status.get("xpass"):
157
+ self.config.framework.pytest.xfail_status.set_xpass(
158
+ xfail_status.get("xpass")
159
+ )
160
+
148
161
  except Exception as e:
149
162
  self.logger.log("Failed to load config from file", "error")
150
163
 
@@ -214,5 +227,12 @@ class ConfigManager:
214
227
  if key == 'QASE_PYTEST_CAPTURE_LOGS':
215
228
  self.config.framework.pytest.set_capture_logs(value)
216
229
 
230
+ if key == 'QASE_PYTEST_XFAIL_STATUS_XFAIL':
231
+ self.config.framework.pytest.xfail_status.set_xfail(value)
232
+
233
+ if key == 'QASE_PYTEST_XFAIL_STATUS_XPASS':
234
+ self.config.framework.pytest.xfail_status.set_xpass(value)
235
+
236
+
217
237
  except Exception as e:
218
238
  self.logger.log("Failed to load config from env vars {e}", "error")
@@ -17,11 +17,28 @@ class Trace(Enum):
17
17
  failed = "retain-on-failure"
18
18
 
19
19
 
20
+ class XFailStatus(BaseModel):
21
+ xfail: str = None
22
+ xpass: str = None
23
+
24
+ def __init__(self):
25
+ self.xfail = 'skipped'
26
+ self.xpass = 'passed'
27
+
28
+ def set_xfail(self, value: str):
29
+ self.xfail = value
30
+
31
+ def set_xpass(self, value: str):
32
+ self.xpass = value
33
+
34
+
20
35
  class PytestConfig(BaseModel):
21
36
  capture_logs: bool = None
37
+ xfail_status: XFailStatus = None
22
38
 
23
39
  def __init__(self):
24
40
  self.capture_logs = False
41
+ self.xfail_status = XFailStatus()
25
42
 
26
43
  def set_capture_logs(self, capture_logs):
27
44
  self.capture_logs = QaseUtils.parse_bool(capture_logs)
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: qase-python-commons
3
- Version: 3.2.3
3
+ Version: 3.2.4
4
4
  Summary: A library for Qase TestOps and Qase Report
5
5
  Author-email: Qase Team <support@qase.io>
6
- Project-URL: Homepage, https://github.com/qase-tms/qase-python/tree/master/qase-python-commons
6
+ Project-URL: Homepage, https://github.com/qase-tms/qase-python/tree/main/qase-python-commons
7
7
  Classifier: Development Status :: 5 - Production/Stable
8
8
  Classifier: Programming Language :: Python
9
9
  Classifier: Intended Audience :: Developers
@@ -1,5 +1,5 @@
1
1
  qase/commons/__init__.py,sha256=3HI65PJES4Q6YvtkSuRPh6tZboTETJo8wbdHlNYaePU,323
2
- qase/commons/config.py,sha256=meRRgDrsA9qQ9fZR4fnP0VdngrKiGcHF9nnJkf3eJpg,8320
2
+ qase/commons/config.py,sha256=dtF8JPHeGe4SxpR36WbvzX76yP-0nP43NpCf6sh9d-I,9245
3
3
  qase/commons/loader.py,sha256=-MMY4HgSI6q1xq3NaJoq_w4liM73qdFKjYLVCT1E7Pc,1064
4
4
  qase/commons/logger.py,sha256=ka5chQYBXLUB5pM4YHDBo3QCZfBTGMtC3H33tI4NbPQ,1027
5
5
  qase/commons/utils.py,sha256=OOr6kQ5hPZEyHXwbwiTOTkonRxmmtkyZPPGqXQKp5vY,2799
@@ -18,7 +18,7 @@ qase/commons/models/step.py,sha256=M-btRYZ4febYavDhwFqmKcCdLAgrhtuv7E_M3TKZdfg,4
18
18
  qase/commons/models/config/api.py,sha256=IyYY2f3ncESUAEGvkE3-meatebBFJdvgo7KNOQnxLE0,288
19
19
  qase/commons/models/config/batch.py,sha256=X0H8SVOCCD2pV6LSMqjI-tIjRcLifnrM5MareK2FhQw,321
20
20
  qase/commons/models/config/connection.py,sha256=wK2fGjc0G0rMVVhPnjw_t_M1YWZwANlhwl-awmI7XSo,516
21
- qase/commons/models/config/framework.py,sha256=N4vSS1EAu8LEzYSbpy3Z4rNY2DbpWQ4Mh1mknRfMDRM,1432
21
+ qase/commons/models/config/framework.py,sha256=sSWKQp18zxiS_79_XDH2hkHLpYEQnyH3bRquaT8XYYY,1803
22
22
  qase/commons/models/config/plan.py,sha256=JbAY7qfGXYreXOLa32OLxw6z0paeCCf87-2b1m8xkks,137
23
23
  qase/commons/models/config/qaseconfig.py,sha256=-tuTsd6s4YSAkSca7vvNaFZbqhbWkxuw-mjeqhwmjlc,1722
24
24
  qase/commons/models/config/report.py,sha256=g3Z2B3Tewaasjc1TMj2mkXxz0Zc1C39sHeTXH0MRM2Y,497
@@ -33,7 +33,7 @@ qase/commons/reporters/core.py,sha256=0x5G-KVfEOWyXiXaX5__7JBIr3Rxy8vhy0cByUSZUc
33
33
  qase/commons/reporters/report.py,sha256=zyGeUOcJCOEoGtsewCOf3kypbPttJH7EM-LmZ_Y5huY,4829
34
34
  qase/commons/reporters/testops.py,sha256=f5BcorFwIK5BSeA4Rv4IKDddkWrAXL_w-Y5Xn--NdYs,6264
35
35
  qase/commons/validators/base.py,sha256=wwSn-4YiuXtfGMGnSKgo9Vm5hAKevVmmfd2Ro6Q7MYQ,173
36
- qase_python_commons-3.2.3.dist-info/METADATA,sha256=v5slVZAwnHG7e6g6xLtOBA_CMu1IfE8Db8y9gSgwfbg,1859
37
- qase_python_commons-3.2.3.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
38
- qase_python_commons-3.2.3.dist-info/top_level.txt,sha256=Mn5aFk7H7Uia4s1NRDsvebu8vCrFy9nOuRIBfkIY5kQ,5
39
- qase_python_commons-3.2.3.dist-info/RECORD,,
36
+ qase_python_commons-3.2.4.dist-info/METADATA,sha256=50HIoGDMvI18xxQ5eRuzTLkaecAHmso9eZW8QKkVIO8,1857
37
+ qase_python_commons-3.2.4.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
38
+ qase_python_commons-3.2.4.dist-info/top_level.txt,sha256=Mn5aFk7H7Uia4s1NRDsvebu8vCrFy9nOuRIBfkIY5kQ,5
39
+ qase_python_commons-3.2.4.dist-info/RECORD,,