Skip to content

[py] Skip bidi tests on browsers that don't support bidi #15625

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 15, 2025

Conversation

cgoldberg
Copy link
Contributor

@cgoldberg cgoldberg commented Apr 13, 2025

User description

💥 What does this PR do?

This PR adjusts the internal Python PyTest configuration so tests are skipped when --bidi is enabled on browsers that don't support BiDi (ie, safari, webkitgtk, wpewebkit).

This removes the need to mark BiDi tests with xfail markers on browsers where they are expected to fail.

🔄 Types of changes

  • Bug fix (backwards compatible)

PR Type

Bug fix


@selenium-ci selenium-ci added the C-py Python Bindings label Apr 13, 2025
@qodo-merge-pro qodo-merge-pro bot added Review effort 2/5 and removed C-py Python Bindings labels Apr 13, 2025
Copy link
Contributor

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ No major issues detected

Copy link
Contributor

qodo-merge-pro bot commented Apr 13, 2025

PR Code Suggestions ✨

No code suggestions found for the PR.

@navin772
Copy link
Member

Can we have a common marker for Safari, WebKitGTK and WPEWebKit apart from their individual ones which we can use to skip tests? IMO, using that many xfail marker makes the test look not so elegant.

@cgoldberg
Copy link
Contributor Author

I can create one like xfail_nobidi or something. I'll update this PR later today.

@cgoldberg cgoldberg changed the title [py] Add pytest markers for skipping bidi tests [py] Skip bidi tests on browsers that don't support bidi Apr 14, 2025
@cgoldberg
Copy link
Contributor Author

@navin772 check out these changes... I updated the PR description also.

Now you don't need to use xfail markers at all on BiDi tests. Instead, tests will be skipped if you run them with --bidi on a browser/driver that doesn't support BiDi.

@navin772
Copy link
Member

This looks much better, can you also add a note in the testing guide for the same? It will help contributors understand which drivers are being skipped.

@cgoldberg
Copy link
Contributor Author

@navin772 Which testing guide do you mean? In the main README.md of the repo where the testing commands are described? There really isn't any Python-specific info about running tests in there (maybe there should be).
It's also pretty clear when and why the tests are skipped. You will see:

SKIPPED (WebKitGTK does not support BiDi) 

I am going to merge this PR, but I will update any documentation that you think this should be mentioned in.

@cgoldberg cgoldberg merged commit 70dd7d4 into SeleniumHQ:trunk Apr 15, 2025
17 checks passed
@cgoldberg cgoldberg deleted the py-bidi-test-markers branch April 15, 2025 00:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants