Skip to content

fix python README.md for running tests #2047

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 1 commit into from
Nov 6, 2024

Conversation

navin772
Copy link
Member

@navin772 navin772 commented Nov 6, 2024

User description

Thanks for contributing to the Selenium site and documentation!
A PR well described will help maintainers to review and merge it quickly

Before submitting your PR, please check our contributing guidelines.
Avoid large PRs, and help reviewers by making them as simple and short as possible.

Description

The current instructions to run a specific test in python directory uses python script.py which won't run the tests, instead pytest script.py needs to be used

Types of changes

  • Change to the site (I have double-checked the Netlify deployment, and my changes look good)
  • Code example added (and I also added the example to all translated languages)
  • Improved translation
  • Added new translation (and I also added a notice to each document missing translation)

Checklist

  • I have read the contributing document.
  • I have used hugo to render the site/docs locally and I am sure it works.

PR Type

documentation


Description

  • Updated the Python README.md to correct the command for running specific test scripts.
  • Changed the example command from python script.py to pytest path/to/test_script.py to ensure tests are executed correctly.
  • Provided clearer instructions on replacing the script path and name in the command.

Changes walkthrough 📝

Relevant files
Documentation
README.md
Update command for running specific Python tests in README

examples/python/README.md

  • Updated command to run specific Selenium Python examples.
  • Changed from python script.py to pytest path/to/test_script.py.
  • Clarified instructions for replacing the script path and name.
  • +2/-2     

    💡 PR-Agent usage: Comment /help "your question" on any pull request to receive relevant information

    Copy link

    netlify bot commented Nov 6, 2024

    👷 Deploy request for selenium-dev pending review.

    Visit the deploys page to approve it

    Name Link
    🔨 Latest commit 27c8c09

    Copy link
    Contributor

    qodo-merge-pro bot commented Nov 6, 2024

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

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

    Copy link
    Contributor

    qodo-merge-pro bot commented Nov 6, 2024

    PR Code Suggestions ✨

    Explore these optional code suggestions:

    CategorySuggestion                                                                                                                                    Score
    Enhancement
    Include information about the prerequisite of having pytest installed

    Consider adding a note about the need to install pytest if it's not already
    installed, as the command now uses pytest instead of the standard Python
    interpreter.

    examples/python/README.md [32-36]

     ## Execute a specific example
     To run a specific Selenium Python example, use the following command:
     ```bash
     pytest path/to/test_script.py

    +Note: Make sure you have pytest installed. If not, you can install it using pip install pytest.
    +

    
    - [ ] **Apply this suggestion** <!-- /improve --apply_suggestion=0 -->
    
    <details><summary>Suggestion importance[1-10]: 7</summary>
    
    Why: The suggestion adds important information about the prerequisite of having pytest installed, which is crucial for users to successfully run the examples. This enhances the clarity and completeness of the instructions.
    
    
    </details></details></td><td align=center>7
    
    </td></tr></tr></tbody></table>
    
    >💡 Need additional feedback ? start a [PR chat](https://chromewebstore.google.com/detail/ephlnjeghhogofkifjloamocljapahnl)
    
    

    @harsha509
    Copy link
    Member

    LGTM!

    Test failure is not related to this change.!

    @harsha509 harsha509 merged commit 86f8a81 into SeleniumHQ:trunk Nov 6, 2024
    8 of 9 checks passed
    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.

    2 participants