Skip to content
Sharp

Testing · interview question

Which move is the best default when tmp_path and file tests becomes part of this workflow?

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

Correct answer

A. Use temporary directories and controlled files so the test owns its environment and leaves no hidden residue.

Why

Use temporary directories and controlled files so the test owns its environment and leaves no hidden residue. That is the stronger engineering move because candidates sound production-ready when they talk about test isolation as a reliability issue. 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 →