testpath

Test utilities for code working with files and commands

11 个版本 Python >= 3.5
安装
pip install testpath
poetry add testpath
pipenv install testpath
conda install testpath
描述

Testpath is a collection of utilities for Python code working with files and commands.

It contains functions to check things on the filesystem, and tools for mocking system commands and recording calls to those.

Documentation on ReadTheDocs <https://testpath.readthedocs.io/en/latest/>_

e.g.::

import testpath
testpath.assert_isfile(path)

with testpath.assert_calls('git', ['add', path]):
    function_under_test()
版本列表
0.6.0 2022-02-23
0.5.0 2021-05-17
0.4.4 2019-11-04
0.4.3 2019-11-04
0.4.2 2018-10-02
0.4.1 2018-09-27
0.4 2018-09-27
0.3.1 2017-05-24
0.3 2016-02-04
0.2 2015-03-31
0.1 2015-02-02