menu_book Course Curriculum (Software Testing) expand_more
Testing Fundamentals
Assertions & Fixtures
Test Doubles & Dependencies
Coverage & Quality
API & Web Testing
parallel test execution
Learn parallel test execution in Software Testing with a dedicated explanation, a concept-specific example, practical cautions, and a mastery check.
12 min read
•
Advanced
Advertisement
software-testing-042.py
python
# pytest -n auto
# tests must not share mutable global state
def test_worker_safe(tmp_path):
f=tmp_path/'worker.txt'; f.write_text('ok'); assert f.read_text()=='ok'
What to watch
Content source & attribution
Original Syntaxis Content · Original Syntaxis Content