What's New in 0.4.2
Introduced @test_case decorator to easily identify test methods without enforcing naming conventions.
Features
- @test_case Decorator: Mark any function as a test case using
@test_case. This allowsexpect()to function correctly even if the function name doesn't start withtest_. - Parallel Testing: CI now runs tests in parallel using
pytest-xdist, verifying thread safety of the new features. - pytest.ini: Better test discovery support for
test.py.
Usage
from delayed_assert import expect, assert_expectations, test_case
@test_case
def verify_custom_scenario():
expect(1 == 1, "Should pass")
def test_runner():
verify_custom_scenario()
assert_expectations()Improvements
- Verified zero-dependency installation (no runtime dependency on pytest).
- Improved internal context management using
threading.local.