Skip to content

Commit

Permalink
Fix tests (rerun issue)
Browse files Browse the repository at this point in the history
  • Loading branch information
VladimirPodolian committed Dec 27, 2024
1 parent f17ccb7 commit 7a57b86
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/playwright_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
- name: Run Playwright ${{ matrix.browser-name }} tests with py${{ matrix.python-version }}
id: tests
run: |
tox -e py${{ env.TOX_ENV }}-playwright-${{ matrix.browser-name }} -- --headless -v --alluredir=allure-report --reruns=1
tox -e py${{ env.TOX_ENV }}-playwright-${{ matrix.browser-name }} -- --headless -v --alluredir=allure-report --reruns=2
continue-on-error: true

- name: Upload Allure Report as Artifact
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/selenium_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ jobs:
- name: Run Selenium ${{ env.BROWSER }} tests with py${{ matrix.python-version }}
run: |
tox -e py${{ env.TOX_ENV }}-selenium-${{ env.BROWSER }} -- --env remote --headless -v --reruns=1
tox -e py${{ env.TOX_ENV }}-selenium-${{ env.BROWSER }} -- --env remote --headless -v --reruns=2
3 changes: 2 additions & 1 deletion tests/web_tests/test_assert_screenshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,12 @@ def test_screenshot_remove(colored_blocks_page):

@pytest.fixture
def file(request):
initial_reruns_count = request.node.session.config.option.reruns
request.node.execution_count = 1
request.node.session.config.option.reruns = 1
filename = 'reference_with_rerun'
yield filename
request.node.session.config.option.reruns = 0
request.node.session.config.option.reruns = initial_reruns_count
if not request.config.option.sv:
os.remove(f'{os.getcwd()}/tests/adata/visual/reference/{filename}.png')

Expand Down

0 comments on commit 7a57b86

Please sign in to comment.