Skip to content

Latest commit

History

History
71 lines (47 loc) 路 801 Bytes

python.md

File metadata and controls

71 lines (47 loc) 路 801 Bytes

Python commands

Virtual Environment

  • Create virtual environment

    python3 -m venv <venv_path>

    Example:

    python3 -m venv myenv
  • Activate virtual environment

    source <venv_path>/bin/activate

    Example:

    source myenv/bin/activate
  • Deactivate virtual environment

    deactivate

Pytest

  • Run tests without warnings

    pytest --disable-warnings
  • Run tests with fail fast

    pytest -x
  • Run tests watching full differences

    pytest -vv
  • Run tests with print function

    pytest -s
  • Run tests of a file or directory

    pytest <file_or_directory_path>
  • Run tests with many options

    pytest -x -s -vv --disable-warnings