diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2016-04-26 12:21:58 -0400 |
|---|---|---|
| committer | Jason R. Coombs <jaraco@jaraco.com> | 2016-04-26 12:21:58 -0400 |
| commit | bc6444c19b9a80c245c52cdb2645ce7bc976ac52 (patch) | |
| tree | c89dbb333f67dcb72b0ee0e406c6d9c6ce4f9059 | |
| parent | b35f7cdf9f0af923af0385c9878a23d3e6494d24 (diff) | |
| download | python-setuptools-git-bc6444c19b9a80c245c52cdb2645ce7bc976ac52.tar.gz | |
Add tests for ez_setup.py
| -rw-r--r-- | conftest.py | 10 | ||||
| -rw-r--r-- | test_ez_setup.py | 10 |
2 files changed, 20 insertions, 0 deletions
diff --git a/conftest.py b/conftest.py new file mode 100644 index 00000000..6e8557d0 --- /dev/null +++ b/conftest.py @@ -0,0 +1,10 @@ +import pytest + + +@pytest.yield_fixture +def tmpdir_as_cwd(tmpdir): + try: + orig = tmpdir.chdir() + yield tmpdir + finally: + orig.chdir() diff --git a/test_ez_setup.py b/test_ez_setup.py new file mode 100644 index 00000000..98e7d773 --- /dev/null +++ b/test_ez_setup.py @@ -0,0 +1,10 @@ +import ez_setup + + +def test_download(tmpdir_as_cwd): + ez_setup.download_setuptools() + res, = tmpdir_as_cwd.listdir() + assert res.basename.startswith('setuptools-') + assert res.basename.endswith('.zip') + # file should be bigger than 64k + assert res.size() > 2**16 |
