Recall & Review
beginner
What is the command to install PyTest using pip?
The command to install PyTest is
pip install pytest. This downloads and installs PyTest so you can use it to run tests.Click to reveal answer
beginner
Why do we use
pip install pytest?We use
pip install pytest to add the PyTest testing tool to our Python environment. It helps us run and manage tests easily.Click to reveal answer
beginner
What should you check after running
pip install pytest?After installing, check that PyTest is installed by running
pytest --version. It shows the installed PyTest version if successful.Click to reveal answer
intermediate
Can you install PyTest globally and in a virtual environment? Explain.
Yes. Installing globally makes PyTest available to all projects on your computer. Installing in a virtual environment keeps it only for that project, avoiding conflicts.
Click to reveal answer
intermediate
What happens if you run
pip install pytest but PyTest is already installed?Pip will say 'Requirement already satisfied' and do nothing. It will not upgrade PyTest. To upgrade, use
pip install --upgrade pytest.Click to reveal answer
What does the command
pip install pytest do?✗ Incorrect
The command
pip install pytest installs the PyTest tool so you can run tests.How can you verify PyTest is installed after running the install command?
✗ Incorrect
Running
pytest --version shows the installed PyTest version, confirming installation.Where is it recommended to install PyTest for project isolation?
✗ Incorrect
Installing PyTest in a virtual environment keeps dependencies isolated per project.
What happens if PyTest is already installed and you run
pip install pytest again?✗ Incorrect
If PyTest is already installed, pip reports 'Requirement already satisfied' and takes no further action. Use
pip install --upgrade pytest to upgrade.Which tool is used to install PyTest?
✗ Incorrect
PyTest is a Python tool installed using pip, Python's package manager.
Explain how to install PyTest and verify its installation.
Think about the commands and how to confirm installation.
You got /3 concepts.
Describe the difference between installing PyTest globally and in a virtual environment.
Consider how Python environments isolate packages.
You got /3 concepts.