Closed AlthausKonstantin closed 6 months ago
but I could not figure out how to run the unit tests
- see if this helps, you just create a dummy project and set that in your config and tests will be run against that project, there is no regression w/ this PR.
- I use the local commit mentioned in below listing just to make install pylero as editable (helps for debugging w/
breakpoint
) and run tests.# gpr 117 From github.com:RedHatQE/pylero
- [new ref] refs/pull/117/head -> pr117 Switched to branch 'pr117'
Auto-merging setup.py [pr117 bb6554d] editable temp commit Date: Wed Jan 25 08:21:30 2023 +0530 1 file changed, 2 insertions(+), 1 deletion(-)
commit bb6554dd7786446a12ac62e28dd1194f76f829b5 (HEAD -> pr117) Author: Leela Venkaiah G lgangava@redhat.com Date: Wed Jan 25 08:21:30 2023 +0530
editable temp commit
diff --git a/setup.py b/setup.py index b3f50e8..c7109a3 100644 --- a/setup.py +++ b/setup.py @@ -46,7 +46,8 @@ if name == "main": author_email="dno-tools@redhat.com", license="MIT", package_dir={
Obtaining file:///root/toolbox/pylero Installing build dependencies ... done Checking if build backend supports build_editable ... done Getting requirements to build editable ... done Preparing editable metadata (pyproject.toml) ... done Requirement already satisfied: click in /root/toolbox/venv/pylero/lib/python3.12/site-packages (from pylero==0.0.4) (8.1.7) Requirement already satisfied: suds in /root/toolbox/venv/pylero/lib/python3.12/site-packages (from pylero==0.0.4) (1.1.2) Building wheels for collected packages: pylero Building editable for pylero (pyproject.toml) ... done Created wheel for pylero: filename=pylero-0.0.4-0.editable-py3-none-any.whl size=9036 sha256=9ef54ab7abb89f41ec9accd68a07842f6310d3dfdffe0cfc1549fc4f45b43410 Stored in directory: /tmp/pip-ephem-wheel-cache-3sf9pgxw/wheels/92/72/83/a4d9f0ebfaf6b6fd6d5d457218f1aba28e9ef2e2a6c1bd9e31 Successfully built pylero Installing collected packages: pylero Attempting uninstall: pylero Found existing installation: pylero 0.0.9 Uninstalling pylero-0.0.9: Successfully uninstalled pylero-0.0.9 Successfully installed pylero-0.0.4
[notice] A new release of pip is available: 23.2.1 -> 24.0 [notice] To update, run: pip install --upgrade pip
Ran 14 tests in 103.358s
OK
/hold merge for rework on reviewable diff
I cleaned up my history :)
Great work, I've tested it and it pass my local test without regression.
For test local, after create a dummy project and prepared a .pylero
config with it and user token, the src/unit_tests/attribute_test.py
have two hard code users USER and ALT_USER might need be created on your instance.
Thanks for working on this.
Hi there!
This PR is addresses https://github.com/RedHatQE/pylero/issues/175.
I refactored the functions
create_incident_report
andgenerate_description
to methods of the classTestRun
. In those two methods, I circumnavigate the usage ofTestCase
by using the project's predefined test case work item (member ofproject.get_tests_configuration()
). Should also this work item type not exist, I use the base class_WorkItem
.I have tested this exploratively on my side, but I could not figure out how to run the unit tests. Can I do that at all?