Commit 9366bb09 authored by Jason R. Coombs's avatar Jason R. Coombs

Add tests capturing expected behavior, including failure to match expectation...

Add tests capturing expected behavior, including failure to match expectation indicated in docstring.
parent 595ed8ba
import pytest
import setuptools
@pytest.fixture
def example_source(tmpdir):
tmpdir.mkdir('foo')
(tmpdir / 'foo/bar.py').write('')
(tmpdir / 'readme.txt').write('')
return tmpdir
def test_findall(example_source):
found = list(setuptools.findall(str(example_source)))
expected = ['readme.txt', 'foo/bar.py']
assert found == expected
def test_findall_curdir(example_source):
with example_source.as_cwd():
found = list(setuptools.findall())
expected = ['readme.txt', 'foo/bar.py']
assert found == expected
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment