Skip to content
C

Fixture-Based List Tests

Easypython

Write a fixture-style function sample_numbers() that provides a list of numbers, then use it in two separate checks: one testing the sum, one testing the length — mirroring pytest's @pytest.fixture pattern.

Approach: sample_numbers() returns the given list of numbers (this stands in for a @pytest.fixture, providing reusable data to multiple tests). Two separate checks then reuse it: one asserts the sum, one asserts the length.

Input: One line: 5 space-separated numbers.

Output: Two lines: test_sum: PASS then test_length: PASS.

Input (stdin)

Output

Run your code to see output here...