qxf2 / qxf2-page-object-model

Write Selenium and Appium tests in Python using the Page Object pattern. This Pythonic GUI and API test automation framework will help you get started with QA automation quickly. It comes with many useful integrations like - email, BrowserStack, Slack, TestRail, etc. This repository is developed and maintained by Qxf2 Services.
https://qxf2.com
MIT License
261 stars 192 forks source link

made a little bit of cleanup to conftest.py #393

Closed MYusufY closed 5 months ago

MYusufY commented 5 months ago

(Kinda) Solved:

But, i only be abled to cleanup around like first 90 lines :)

Improved pylint score from 2.95/10 to 3.73/10

Changes Made:

  1. Organized Imports:

    • Split import os,pytest,sys into separate lines for readability.
    • Removed any duplicate or unnecessary imports (though none were present in this case).
    • Grouped related imports together.
  2. Code Style Improvements:

    • Replaced print statements with logger.error for better logging practice.
    • Used f-strings for string formatting for better readability and performance.
    • Ensured consistent indentation and spacing throughout the code.
  3. Refactored Conditions and Strings:

    • Used if not default_flag: instead of if default_flag == False: for clarity.
    • Cleaned up the TestRail exception message for better readability.
  4. Documentation:

    • Added a docstring to the test_obj fixture function for better documentation.

I hope this works, thanks! (To be sure i did nothing wrong, i used ai a little.)

MYusufY commented 5 months ago

Thank you for the answer :) I actually kinda forgot to add it :) I cut it and paste it into another file, to clean it up. But then after cleaning the test_obj, I forgot test_mobile obj :) Sorry for this. I will add it ASAP :)