14 questions · pass mark 80% · 20 minute limit. The timer auto-submits at zero.
Time remaining: 20:00
Question 1easy
How does a pytest test assert an expected value?
Question 2easy
Why should you NOT assert on the exact text an LLM returns?
Question 3medium
What does a pytest fixture do?
Question 4medium
What is `@pytest.mark.parametrize` used for?
Question 5medium
How do you assert that a call raises a ValueError in pytest?
Question 6hard
Why mock the LLM/HTTP call in tests?
Question 7medium
What does pytest's `monkeypatch.setattr(assistant, 'call_llm', fake)` accomplish?
Question 8medium
In a layered AI app, what belongs in the `domain/` layer?
Question 9medium
What is the main testability benefit of putting the LLM client in an `adapters/` layer?
Question 10hard
Why use `?` placeholders in `conn.execute("INSERT INTO runs VALUES (?, ?)", (id, score))`?
Question 11medium
What is mypy?
Question 12easy
Which Python functions convert between a dict and a JSON string?
Question 13medium
Name the Python test framework taught here (whose tests are `test_*` functions with plain asserts).
Question 14hard
One word: keeping domain logic free of framework/vendor imports so it can be tested and swapped is the principle of ____ (the app quality this promotes).