# Testpath

Testpath is a collection of utilities for testing code which uses and manipulates the filesystem and system commands.

Install it with:

    pip install testpath

Contents:

- Assertion functions for the filesystem
  - `assert_path_exists()`
  - `assert_not_path_exists()`
  - `assert_isfile()`
  - `assert_not_isfile()`
  - `assert_isdir()`
  - `assert_not_isdir()`
  - `assert_islink()`
  - `assert_not_islink()`
  - Unix specific
- Mocking system commands
  - `assert_calls()`
  - `MockCommand`
- Modifying environment variables
  - `modified_env()`
  - `temporary_env()`
  - `make_env_restorer()`
- Utilities for temporary directories
  - `NamedFileInTemporaryDirectory`
  - `TemporaryWorkingDirectory`

- Release notes

# Indices and tables

- Index

- Search Page