diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2021-04-25 18:05:55 -0400 |
|---|---|---|
| committer | Jason R. Coombs <jaraco@jaraco.com> | 2021-04-25 19:50:34 -0400 |
| commit | 4d7a11ef9c7cd4eedf5f8fcbf16e2fc526682176 (patch) | |
| tree | 8543fb30dfbbb3db5b142c26bfbb22a8bcd6dbf1 /setuptools/tests/test_upload_docs.py | |
| parent | 8b494633df0f6770946092498aed76fd30be99b1 (diff) | |
| parent | b5fa6ad11e1344648b470ff0d847a7d940b4c99d (diff) | |
| download | python-setuptools-git-4d7a11ef9c7cd4eedf5f8fcbf16e2fc526682176.tar.gz | |
Merge branch 'main' into feature/distutils-docs
Diffstat (limited to 'setuptools/tests/test_upload_docs.py')
| -rw-r--r-- | setuptools/tests/test_upload_docs.py | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/setuptools/tests/test_upload_docs.py b/setuptools/tests/test_upload_docs.py index a26e32a6..55978aad 100644 --- a/setuptools/tests/test_upload_docs.py +++ b/setuptools/tests/test_upload_docs.py @@ -3,6 +3,7 @@ import zipfile import contextlib import pytest +from jaraco import path from setuptools.command.upload_docs import upload_docs from setuptools.dist import Distribution @@ -10,28 +11,20 @@ from setuptools.dist import Distribution from .textwrap import DALS from . import contexts -SETUP_PY = DALS( - """ - from setuptools import setup - - setup(name='foo') - """) - @pytest.fixture def sample_project(tmpdir_cwd): - # setup.py - with open('setup.py', 'wt') as f: - f.write(SETUP_PY) - - os.mkdir('build') - - # A test document. - with open('build/index.html', 'w') as f: - f.write("Hello world.") - - # An empty folder. - os.mkdir('build/empty') + path.build({ + 'setup.py': DALS(""" + from setuptools import setup + + setup(name='foo') + """), + 'build': { + 'index.html': 'Hello world.', + 'empty': {}, + } + }) @pytest.mark.usefixtures('sample_project') |
