Sheepy is a lightweight unit testing framework designed for Python developers who value simplicity and ease of use. It provides a core set of components to write unit tests and generate basic test reports.
- Added full support for API testing in the Sheepy test framework.
- Implemented
ApiRequests
module for handling HTTP requests (GET, POST, PUT, DELETE) in API tests. - Introduced new assert methods:
assertStatusCode
,assertJsonResponse
, andassertResponseContains
to validate HTTP responses. - Provided built-in HTTP error handling via the
HttpError
exception class.
- SheepyTestCase: Implementation of the class that automatically registers and runs tests when inheriting.
- TestOutputFormatter: Module created to format test results, providing a clear and consistent view of the outputs.
- Assertions Module: Creation of a separate module (asserts.py) that includes assertion methods such as assertEqual, assertTrue, assertFalse, and assertRaises.
- Test Execution: Modification of the logic in the SheepyTestCase class to run tests when registering subclasses.
- Output Formats: Updated the _output_results method to use TestOutputFormatter, improving the presentation of test results.
- Code Structure: Removed assertion methods from the SheepyTestCase class to centralize the assertion logic in the new module.
- Error Messages: Improvements in error messages for expected failures and tests.
changing the entire project structure, reorganizing and changing use cases. Improving to increasingly optimize unit tests.
- Test decoration: Using the @sheepy decorator to mark functions as test cases.
- Test discovery: Automatically finding test cases within a specified class.
- Test runner: Executing test cases and collecting results.
- Basic reporting: Generating a simple pass/fail report.
- Logging: Providing a mechanism for logging test execution details.