tmckayus / testpath

Test utilities for Python code working with files and commands

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

e.g.:

import testpath
testpath.assert_isfile(path)

with testpath.assert_calls('git', ['add', path]):
    function_under_test()

About

Test utilities for Python code working with files and commands

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Python 100.0%