Skip to content

opensourcecourse/testing-assignment

Repository files navigation

Testing Assignment

This assigment will introduce you to the pytest framework. We will be implementing some tests for the pydantic package, which we used in the last assignment.

Looking over a basic pydantic tutorial (such as this one) may also be helpful.

As before, once you are finished with the assignment submit a PR and ping the instructors for feedback.

Task 1: Basic Tests (10 points)

Look at test_task_1.py and fill in the test functions according to their descriptions.

Task 2: Fixtures (10 points)

Look at test_task_2.py and fill in the fixtures according to their descriptions. You shouldn't modify the tests.

Task 3: Marks and Configuration (5 points)

Look at test_task_3.py and perform required actions. Create a custom mark called "long_running" and register it in the pytest.ini file. See the pytest docs for details.

Next, look at answers.md and fill in the requested information about pytest command line usage.

Acknowledgements

Data from devstronomy.

About

An assignment to learn pytest basics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages