Good catch - the instruction text is right and the code cell is the typo. It should be sys.dont_write_bytecode = True. With False (Python's default) the tests still run, since Python silently ignores a failed .pyc write, but on a writable Git folder you end up with __pycache__ folders next to your test files.
Use the same pattern as the Databricks unit-testing docs:
import pytest, sys
sys.dont_write_bytecode = True # skip .pyc files on a read-only filesystem
retcode = pytest.main([".", "-v", "-p", "no:cacheprovider"]) # no .pytest_cache either
assert retcode == 0, "The pytest invocation failed. See the log for details."
-p no:cacheprovider is the companion setting - it stops pytest writing its .pytest_cache folder for the same reason.
If you already ran the lab with False and see __pycache__ folders in your repo, delete them (or add __pycache__/ to .gitignore) so they don't get committed.
To get the notebook fixed for other learners, report it to the Academy team: https://help.databricks.com/s/contact-us?ReqType=training
Docs: https://docs.databricks.com/aws/en/notebooks/testing