Django - Testing Django ApplicationsYou want to exclude all files in a 'migrations' folder from coverage reports. Which .coveragerc setting achieves this?A[run] omit = */migrations/*B[report] include = */migrations/*C[run] include = */migrations/*D[report] omit = */static/*Check Answer
Step-by-Step SolutionSolution:Step 1: Understand omit usage in .coveragercThe 'omit' setting under [run] excludes files or folders from coverage measurement.Step 2: Match pattern to migrations folder[run] omit = */migrations/* correctly uses 'omit = */migrations/*' to exclude all migrations files.Final Answer:[run] omit = */migrations/* -> Option AQuick Check:Exclude folder = omit pattern in [run] section [OK]Quick Trick: Use omit in [run] to exclude folders from coverage [OK]Common Mistakes:MISTAKESUsing include instead of omit to exclude filesPlacing omit under [report] instead of [run]Wrong folder pattern in omit
Master "Testing Django Applications" in Django9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallPerf
More Django Quizzes DRF Advanced Features - Serializer validation - Quiz 14medium DRF Advanced Features - DRF authentication (Token, JWT) - Quiz 8hard Deployment and Production - Docker containerization - Quiz 9hard Deployment and Production - Environment-based settings - Quiz 1easy Security Best Practices - XSS prevention in templates - Quiz 6medium Signals - pre_save and post_save signals - Quiz 8hard Signals - Connecting signal handlers - Quiz 7medium Testing Django Applications - Testing models - Quiz 10hard Testing Django Applications - Why testing Django apps matters - Quiz 1easy Testing Django Applications - TestCase and SimpleTestCase - Quiz 2easy