summaryrefslogtreecommitdiff
path: root/setuptools/tests/test_egg_info.py
diff options
context:
space:
mode:
Diffstat (limited to 'setuptools/tests/test_egg_info.py')
-rw-r--r--setuptools/tests/test_egg_info.py23
1 files changed, 12 insertions, 11 deletions
diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py
index a1caf9fd..8d831107 100644
--- a/setuptools/tests/test_egg_info.py
+++ b/setuptools/tests/test_egg_info.py
@@ -4,6 +4,7 @@ import stat
import pytest
from . import environment
+from .files import build_files
from .textwrap import DALS
from . import contexts
@@ -22,14 +23,13 @@ class TestEggInfo:
""")
def _create_project(self):
- with open('setup.py', 'w') as f:
- f.write(self.setup_script)
-
- with open('hello.py', 'w') as f:
- f.write(DALS("""
+ build_files({
+ 'setup.py': self.setup_script,
+ 'hello.py': DALS("""
def run():
print('hello')
- """))
+ """)
+ })
@pytest.yield_fixture
def env(self):
@@ -44,13 +44,14 @@ class TestEggInfo:
for dirname in subs
)
list(map(os.mkdir, env.paths.values()))
- config = os.path.join(env.paths['home'], '.pydistutils.cfg')
- with open(config, 'w') as f:
- f.write(DALS("""
+ build_files({
+ env.paths['home']: {
+ '.pydistutils.cfg': DALS("""
[egg_info]
egg-base = %(egg-base)s
- """ % env.paths
- ))
+ """ % env.paths)
+ }
+ })
yield env
def test_egg_base_installed_egg_info(self, tmpdir_cwd, env):