Skip to content

python: test function names tidy up inline with pep8 #10490

Merged
AutomatedTester merged 5 commits intoSeleniumHQ:trunkfrom
symonk:apply-pep8-to-python-tests
Apr 7, 2022
Merged

python: test function names tidy up inline with pep8 #10490
AutomatedTester merged 5 commits intoSeleniumHQ:trunkfrom
symonk:apply-pep8-to-python-tests

Conversation

@symonk
Copy link
Copy Markdown
Member

@symonk symonk commented Mar 29, 2022

A rather crazy one, apologies whoever reviews! I noticed a lot of the tests use a camel case naming, in python we should opt for snake case as best as possible; with the help of regex & the string manipulation plugin for pycharm (highly recommend it!) I've went through all the def test* functions inside /py/test/selenium* and rejigged them into snake case.

This also has some extra pieces of:

  • Remove duplicate test names (likely not executing the former defined ones as they are overwritten in the namespace)
  • Made some non test functions (utility) inline with snake case
  • Removed some redundant fixtures from tests

Kinda relying on CI to give me a steer in any fallout here; but I was quite meticulous when going through it; so should be minimal (I hope).

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 29, 2022

Codecov Report

Merging #10490 (1bdc6fb) into trunk (ecc30e4) will not change coverage.
The diff coverage is n/a.

❗ Current head 1bdc6fb differs from pull request most recent head 47d53e1. Consider uploading reports for the commit 47d53e1 to get more accurate results

@@           Coverage Diff           @@
##            trunk   #10490   +/-   ##
=======================================
  Coverage   45.05%   45.05%           
=======================================
  Files          85       85           
  Lines        5522     5522           
  Branches      268      268           
=======================================
  Hits         2488     2488           
  Misses       2766     2766           
  Partials      268      268           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3d19b84...47d53e1. Read the comment docs.

@AutomatedTester AutomatedTester merged commit 74f6344 into SeleniumHQ:trunk Apr 7, 2022
@AutomatedTester
Copy link
Copy Markdown
Member

thanks for the PR

@symonk symonk deleted the apply-pep8-to-python-tests branch April 7, 2022 21:01
elgatov pushed a commit to elgatov/selenium that referenced this pull request Jun 27, 2022
)

* `python`: apply pep8 compliant snake case to tests

* fix fallout from commented test changes; update everything inside `py/test/`

Co-authored-by: David Burns <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants