reportportal / agent-python-pytest

Framework integration with PyTest
Apache License 2.0
94 stars 102 forks source link

Refactor `pytest_addoption`, expose `rp_uuid` and `rp_endpoint` to command line #271

Closed rthardin closed 3 years ago

rthardin commented 3 years ago

This merge request aims to allow the rp_uuid and rp_endpoint to be set using the command line. This MR consists of three commits:

  1. Add unit tests which verify which options are added to the .ini file and the command line.
  2. Refactor pytest_addoption to make it easier to keep both sets of arguments consistent.
  3. Add rp_uuid and rp_endpoint as command line arguments.
rthardin commented 3 years ago

It looks like I will also need to change config.py to pick up the changes to rp_uuid and rp_endpoint. I can post an update to the most recent commit for that on Tuesday.

rthardin commented 3 years ago

Thanks for your feedback, @iivanou . I have updated each of those items, and have left them unresolved for you to check over. I have updated the second commit to include the changes to config.py which adds a find_option function. Hopefully this will make it easier to maintain options which live in both the command line and the .ini file. While I was at it, I updated some of the unit tests by moving some mock code into the fixture and adding a few extra checks.

iivanou commented 3 years ago

@rthardin Can you please update README accordingly? Thank you.