VS Code with Python 3 and pytest
Visual Studio Code is a free editor; with Microsoft's Python extension it runs, debugs, and tests Python files. pytest is the free testing tool the course uses to check every class you write.
VS Code with Python 3 and pytest
FreeVisual Studio Code is a free editor; with Microsoft's Python extension it runs, debugs, and tests Python files. pytest is the free testing tool the course uses to check every class you write. Every lesson is readable text with copyable code, keyboard-friendly quizzes and step-throughs, and videos with YouTube captions.
- Install Python 3.10 or newer from python.org (on Windows, the Python install manager; on a Chromebook, turn on the Linux development environment and install python3 with apt).
- Install VS Code from code.visualstudio.com, then install the Python extension by Microsoft from the Extensions view.
- Make a project folder, open it in VS Code, and create a virtual environment with python -m venv .venv (python3 on macOS, Linux, and Chromebooks).
- Select the .venv interpreter, open a new terminal, and run python -m pip install pytest.
- Save a file named test_first.py with one test function and run python -m pytest.