Skip to content
Sharp

Testing · interview question

A teammate submits shaky tmp_path and file tests code. Which review comment is the strongest?

Multiple choiceHardchapter-9-curatedpremiumtestingtmp-path-and-file-tests
Choose one answer
Answer and explanation

Correct answer

B. Make the rule clearer and easier to explain. Use temporary directories and controlled files so the test owns its environment and leaves no hidden residue.

Why

The best review comment anchors the change to readability, correctness, and future maintenance. Tests that depend on one developer's local files are brittle and misleading.

Test yourself on Testing

A free test with instant, explained results. No account needed.

Start free test
All Testing questions →