Git Product home page Git Product logo

auto-test-python's Introduction

Core Classes, Functions, and Methods

TestRunner

Responsible for scanning the directory, running tests on each Python file, and generating the testing report.

  • __init__(self, directory: str): Initializes the TestRunner with the specified directory.
  • run_tests(self) -> str: Runs the tests on each Python file and returns the testing report as a string.
  • scan_directory(self) -> List[str]: Scans the directory for Python files and returns a list of file paths.
  • run_syntax_check(self, file_path: str) -> bool: Runs the syntax check on the Python file and returns True if there are no syntax errors, False otherwise.
  • run_pylint(self, file_path: str) -> List[str]: Runs Pylint on the Python file and returns a list of linting errors and warnings.
  • run_test_cases(self, file_path: str) -> List[str]: Runs the test cases on the Python file and returns a list of failed test cases.
  • generate_report(self, file_path: str, syntax_check_passed: bool, pylint_results: List[str], test_results: List[str]) -> str: Generates the testing report for the Python file.

TestReport

Represents the testing report for a Python file.

  • __init__(self, file_path: str): Initializes the TestReport with the file path.
  • add_syntax_error(self, error: str): Adds a syntax error to the report.
  • add_linting_warning(self, warning: str): Adds a linting warning to the report.
  • add_test_failure(self, failure: str): Adds a test failure to the report.
  • get_report(self) -> str: Returns the testing report as a string.

auto-test-python's People

Contributors

tdolan21 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.