How opula1234/learn_pytest works
Pytest Interactive Sandbox is a hands-on curriculum, not a standalone application: learners run lesson tests to explore Python behavior and pytest techniques. Its workflow progresses from basic assertions, through fixtures, parameterized validation, and mocking, to a shopping-cart TDD challenge. The graph treats the tests as product content because they are the exercises described in the README. Source excerpts show the calculator, fixture setup, validator, weather service, and cart; connections involving unexcerpted test files are based on the documented curriculum and lesson commands.
Main entry points: weather_service.py Weather Advice · test_weather.py Mocking Tests · test_calculator.py Basics Tests · test_fixtures.py Fixture Tests
Components 14
Core Testing
- Basics Tests
01_basics/test_calculator.py - Calculator
01_basics/calculator.py
Pytest Patterns
- Fixture Tests
02_fixtures/test_fixtures.py - Fixture Setup
02_fixtures/conftest.py - Mock User Database
02_fixtures/db.py - Validation Tests
03_parametrize/test_validator.py - Input Validator
03_parametrize/validator.py
Applied Exercises
- Mocking Tests
04_mocking/test_weather.py - Weather Advice
04_mocking/weather_service.py - Cart Challenge Tests
05_challenges/test_shopping_cart.py - Shopping Cart
05_challenges/shopping_cart.py
Other components
- Learner
- Pytest Runner
- Weather API
Connections 15
- Learner → Pytest Runner: runs lessons
README.md - Pytest Runner → Basics Tests: runs tests
README.md - Pytest Runner → Fixture Tests: runs tests
README.md - Pytest Runner → Validation Tests: runs tests
README.md - Pytest Runner → Mocking Tests: runs tests
README.md - Pytest Runner → Cart Challenge Tests: runs tests
README.md - Basics Tests → Calculator: tests
README.md - Fixture Tests → Fixture Setup: exercises fixtures
README.md - Fixture Setup → Mock User Database: creates
02_fixtures/conftest.py - Validation Tests → Input Validator: tests
README.md - Mocking Tests → Weather Advice: exercises mocking
README.md - Weather Advice → Weather API: fetches weather
04_mocking/weather_service.py - Mocking Tests → Weather API: isolates dependency
README.md - Cart Challenge Tests → Shopping Cart: challenges
README.md - Weather Advice → Weather Advice: gets temperature
04_mocking/weather_service.py