Skip to content

šŸ‘An incredible and performant framework for unit testingšŸ‘

License

Notifications You must be signed in to change notification settings

BrunoCiccarino/sheepy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Ā 

History

13 Commits
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 

Repository files navigation

sheepy šŸ‘

Python Version PyPI - Downloads PyPI - Version

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.

Logo

Features

  • 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.

Installation

pip install sheepy

Usage

Here's a basic example of how to use Sheepy:

from sheepy.sheeptest import SheepyTestCase

class ExampleTest(SheepyTestCase):
    def test_success(self):
        self.assertTrue(True)

    def test_failure(self):
        self.assertEqual(1, 2)

    def test_error(self):
        raise Exception("Forced error")

    @SheepyTestCase.skip("Reason to ignore")
    def test_skipped(self):
        pass

    @SheepyTestCase.expectedFailure
    def test_expected_failure(self):
        self.assertEqual(1, 2)


suite = TestSuite([ExampleTest])
runner = TestRunner(suite)
runner.run()

Example output

Test Results:
ExampleTest.test_error: FAIL - Forced error
ExampleTest.test_expected_failure: EXPECTED FAILURE
ExampleTest.test_failure: FAIL - 1 != 2
ExampleTest.test_skipped: SKIPPED -
ExampleTest.test_success: OK

Customization

Sheepy allows for customization in several ways:

  • Logging: ...
  • Reporting: ...
  • Test discovery: ...