PySpark Unit Testing with pytest: cheat sheet for data engineers

Test your PySpark code with pytest and a local SparkSession. This cheat sheet gives you copy-paste fixtures, DataFrame assertions, mocking patterns, and a CI setup you can reuse across Databricks projects.