English
Topic 11. Modules and packages, working with files (pathlib, JSON, CSV), and unit testing with pytest
Goal: learn to organize code across modules, work with paths and structured files, create console commands, and test them automatically with pytest.
Lecture contents
- Modules, packages, and the entry point — Modules and imports · Packages and the entry point
- Paths and text files — Paths and pathlib file operations · Text files and encoding
- JSON and CSV — JSON and the stored-data contract · CSV as a table of text fields
- Unit testing with pytest — Unit tests and pytest · Fixtures, dependencies, and test diagnostics · Project configuration and running in PyCharm · Common mistakes and finishing the work