Skip to content

Commit

Permalink
Merge pull request #252 from atlanhq/DVX-272
Browse files Browse the repository at this point in the history
DVX-272: Enhance pyatlan tests report experience
  • Loading branch information
cmgrote authored Feb 23, 2024
2 parents 4d68140 + 38711a8 commit b2e9955
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/pyatlan-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ jobs:
ATLAN_BASE_URL: ${{ secrets.ATLAN_BASE_URL }}
MARK_API_KEY: ${{ secrets.MARK_ATLAN_API_KEY }}
MARK_BASE_URL: https://mark.atlan.com
run: pytest tests/unit
# Run with `pytest-sugar` for enhancing the overall test report output
run: pytest tests/unit --force-sugar

- name: Prepare integration tests distribution
id: distribute-integration-test-files
Expand Down Expand Up @@ -79,4 +80,6 @@ jobs:
ATLAN_BASE_URL: ${{ secrets.ATLAN_BASE_URL }}
MARK_API_KEY: ${{ secrets.MARK_ATLAN_API_KEY }}
MARK_BASE_URL: https://mark.atlan.com
run: pytest ${{ matrix.test_file }}
# Run the integration test file using `pytest-timer` plugin
# to display only the durations of the 10 slowest tests with `pytest-sugar`
run: pytest ${{ matrix.test_file }} -p name_of_plugin --timer-top-n 10 --force-sugar
6 changes: 4 additions & 2 deletions .github/workflows/pyatlan-test-cron.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ jobs:
ATLAN_BASE_URL: ${{ secrets.ATLAN_BASE_URL }}
MARK_API_KEY: ${{ secrets.MARK_ATLAN_API_KEY }}
MARK_BASE_URL: https://mark.atlan.com
# Run the integration test suite using the `pytest-timer` plugin
# to display only the durations of the 25 slowest tests with `pytest-sugar`
run: |
pytest tests/unit
pytest tests/integration --ignore tests/integration/data_mesh_test.py
pytest tests/unit --force-sugar
pytest tests/integration --ignore tests/integration/data_mesh_test.py -p name_of_plugin --timer-top-n 25 --force-sugar
2 changes: 2 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ black==23.7.0
types-requests==2.31.0.2
pytest==7.4.0
pytest-order==1.1.0
pytest-timer[termcolor]==1.0.0
pytest-sugar==1.0.0
retry==0.9.2
pre-commit==2.20.0
deepdiff==6.2.1
Expand Down
8 changes: 8 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,11 @@ exclude =
__pycache__
pyatlan/model/assets/__init__.py
pyatlan/model/structs/__init__.py

[pytest]
; Here `name_of_plugin` is refers to the pytest-timer
; https://github.com/skudriashev/pytest-timer/blob/a1995d6bb7a6d3f02edbec90622d928a50db95e1/setup.py#L26C50-L26C62
addopts=-p no:name_of_plugin
filterwarnings =
ignore::DeprecationWarning
ignore:urllib3 v2 only supports OpenSSL 1.1.1+

0 comments on commit b2e9955

Please sign in to comment.