You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Verify and ensure that pyproject.toml is included in all relevant Bazel build targets
Ensure that the newly added pyproject.toml file is correctly referenced in all relevant Bazel build targets to maintain consistency across the build configuration.
data = [
- "pyproject.toml",+ "pyproject.toml", # Ensure this file is included in all relevant build targets
"setup.cfg",
...
]
Suggestion importance[1-10]: 9
Why: Ensuring that pyproject.toml is included in all relevant build targets is crucial for maintaining consistency across the build configuration, making it a high-priority best practice.
9
Add a comment specifying the default value for log_cli to ensure clarity and prevent configuration errors
It is recommended to add a default value for log_cli to ensure consistent behavior across different environments or if the configuration is accidentally omitted.
Why: Adding a comment about the default value for log_cli enhances clarity and helps prevent configuration errors, making it a valuable best practice.
8
Maintainability
Improve the readability and maintainability of pytest markers by renaming them to more descriptive names
Consider using a more descriptive marker name for the xfail markers to indicate that these are browser-specific expected failures. This can improve readability and maintainability of the test configurations.
markers = [
- "xfail_chrome: Tests expected to fail in Chrome",- "xfail_edge: Tests expected to fail in Edge",+ "expected_failure_chrome: Tests expected to fail in Chrome",+ "expected_failure_edge: Tests expected to fail in Edge",
...
]
Suggestion importance[1-10]: 7
Why: The suggestion to use more descriptive marker names improves readability and maintainability, but it is not crucial for functionality. It is a good practice for better code clarity.
7
Enhancement
Group xfail markers under a common subsection to enhance configuration readability
Consider grouping the xfail markers under a common subsection to enhance the organization and readability of the pytest configuration.
markers = [
- "xfail_chrome: Tests expected to fail in Chrome",- "xfail_edge: Tests expected to fail in Edge",- ...+ "browser_failures: {+ xfail_chrome: Tests expected to fail in Chrome",+ xfail_edge: Tests expected to fail in Edge",+ ...+ }"
]
Suggestion importance[1-10]: 6
Why: Grouping xfail markers under a common subsection can improve readability, but the suggested code structure is not standard and may introduce confusion. The improvement is minor.
Yes, my question above. It does seem not all tests were executed. Can you please verify?
All Python tests are passed. But there are some errors from .NET modules. I think this has got nothing to do with the changes that I have made.
(08:44:24) ERROR: Traceback (most recent call last):
File "/home/runner/.bazel/external/rules_dotnet~/dotnet/private/transitions/tfm_transition.bzl", line 59, column 13, in _impl
fail("Label {0} does not support the target framework: {1}".format(attr.name, incoming_tfm))
Error in fail: Label fixtures does not support the target framework: net7.0
(08:44:24) ERROR: /home/runner/work/selenium/selenium/dotnet/test/common/BUILD.bazel:35:15: Errors encountered while applying Starlark transition
(08:44:24) ERROR: /home/runner/work/selenium/selenium/dotnet/src/webdriver/BUILD.bazel: no such target '//dotnet/src/webdriver:webdriver': target 'webdriver' not declared in package 'dotnet/src/webdriver' defined by /home/runner/work/selenium/selenium/dotnet/src/webdriver/BUILD.bazel (did you mean WebDriver.cs, or IWebDriver.cs?)
(08:45:21) ERROR: /home/runner/work/selenium/selenium/dotnet/test/support/UI/BUILD.bazel:12:24: no such target '//dotnet/src/webdriver:webdriver': target 'webdriver' not declared in package 'dotnet/src/webdriver' defined by /home/runner/work/selenium/selenium/dotnet/src/webdriver/BUILD.bazel (did you mean WebDriver.cs, or IWebDriver.cs?) and referenced by '//dotnet/test/support/UI:SelectTests'
This execution has around 315 python tests executed (you can search with //py:common and //py:unit). Whereas in this execution I don't see any //py:common tests executed.
This execution has around 315 python tests executed (you can search with //py:common and //py:unit). Whereas in this execution I don't see any //py:common tests executed.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User description
Thanks for contributing to Selenium!
A PR well described will help maintainers to quickly review and merge it
Before submitting your PR, please check our contributing guidelines.
Avoid large PRs, help reviewers by making them as simple and short as possible.
Description
Moved all Pytest settings from
pytest.ini
file topyproject.toml
Motivation and Context
This avoids having to maintain a separate config file for pytest settings. All pytest configuration settings can be maintained in
pyproject.toml
Types of changes
Checklist
PR Type
Enhancement, Configuration changes
Description
pytest.ini
topyproject.toml
.pyproject.toml
instead ofpytest.ini
.pytest.ini
file as it is no longer needed.Changes walkthrough 📝
BUILD.bazel
Update Bazel build configuration to use `pyproject.toml`
py/BUILD.bazel
pytest.ini
withpyproject.toml
in the data section.pytest.ini
Remove `pytest.ini` file
py/pytest.ini
pytest.ini
file and its contents.pyproject.toml
Migrate pytest settings to `pyproject.toml`
py/pyproject.toml
[tool.pytest.ini_options]
.