All syntax guides
Short, practical guides on programming syntax, language fundamentals, and the tools developers reach for every day.
3,965 guides across 14 topics
Topics
Popular guides
Most readLatest guides
Page 55 of 397Python Pytest Exception Testing with pytest.raises
Use pytest.raises to assert exception types and messages in Python: inspect raised exceptions, parametrize test cases, and avoid common mistakes.
Python pytest marks: skip, skipif, and xfail
Use pytest's skip, skipif, and xfail markers to control test execution: skip a test unconditionally, skip when a condition is true, or mark a failing test as expected.
Using pytest.mark.parametrize for Parameterized Tests in Python
Learn how to use pytest.mark.parametrize to write parameterized tests in Python. Covers syntax, multiple arguments, fixtures, custom IDs, class/module-level use, and common pitfalls.
Python Pytest Fixtures Scope and conftest
Learn how pytest fixture scope controls setup frequency and how conftest.py shares fixtures across test files, including when widening scope is safe.
Python Pytest: Basic Tests, Assertions, and Test Discovery
Learn how to write basic pytest tests with plain assert statements, understand pytest test discovery rules, test exceptions and floating-point values, and run a subset of tests.
Python Celery vs APScheduler: Choosing the Right Task Scheduler
Compare Celery and APScheduler for Python background tasks: architecture, scheduling, reliability, scaling, and when to choose each.
Using Python Celery with FastAPI and Django
Integrate Celery with FastAPI and Django: configure a shared Celery app, define reusable tasks, call tasks from views and endpoints, and handle results, errors, and monitoring.
Python Celery Rate Limits: Syntax and Worker Behavior
Configure Python Celery rate limits on tasks, read the rate-limit string syntax, and understand how each worker instance enforces limits.
Python Celery Chains, Groups, and Chords Explained
python celery chains groups and chords: Learn how to compose Celery tasks into sequential chains, parallel groups, and chords that trigger callbacks after parallel wor...
Python Celery Beat and Periodic Tasks
Set up Celery Beat for periodic tasks in Python: interval and crontab schedules, timezone and duplicate-execution pitfalls, and running the scheduler reliably.