diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py index 93f3048092..4db4de65de 100644 --- a/setuptools/tests/test_build_meta.py +++ b/setuptools/tests/test_build_meta.py @@ -194,22 +194,6 @@ def run(): print('hello') """) }, - { # setup.py that relies on __file__ being an absolute path - 'setup.py': DALS(""" - import os - assert os.path.isabs(__file__) - __import__('setuptools').setup( - name='foo', - version='0.0.0', - py_modules=['hello'], - setup_requires=['six'], - ) - """), - 'hello.py': DALS(""" - def run(): - print('hello') - """), - }, ] @@ -836,6 +820,24 @@ def test_sys_argv_passthrough(self, tmpdir_cwd): with pytest.raises(AssertionError): build_backend.build_sdist("temp") + _setup_py_file_abspath = { + 'setup.py': DALS(""" + import os + assert os.path.isabs(__file__) + __import__('setuptools').setup( + name='foo', + version='0.0.0', + py_modules=['hello'], + setup_requires=['six'], + ) + """) + } + + def test_setup_py_file_abspath(self, tmpdir_cwd): + path.build(self._setup_py_file_abspath) + build_backend = self.get_build_backend() + build_backend.build_sdist("temp") + @pytest.mark.parametrize('build_hook', ('build_sdist', 'build_wheel')) def test_build_with_empty_setuppy(self, build_backend, build_hook): files = {'setup.py': ''}