diff options
| author | hauntsaninja <hauntsaninja@gmail.com> | 2023-01-25 09:28:44 -0800 |
|---|---|---|
| committer | hauntsaninja <hauntsaninja@gmail.com> | 2023-01-25 09:28:44 -0800 |
| commit | 4523ba3fcce38e8d02b0d8ee072cfd2d06a14f00 (patch) | |
| tree | 718234d4552a255c19662cb64fdb30cecdd6327a /setuptools/tests | |
| parent | a673186f7c5271cc89916ae533f582643b3b8a86 (diff) | |
| download | python-setuptools-git-4523ba3fcce38e8d02b0d8ee072cfd2d06a14f00.tar.gz | |
dedicated test
Diffstat (limited to 'setuptools/tests')
| -rw-r--r-- | setuptools/tests/test_build_meta.py | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py index 93f30480..4db4de65 100644 --- a/setuptools/tests/test_build_meta.py +++ b/setuptools/tests/test_build_meta.py @@ -194,22 +194,6 @@ defns = [ 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 @@ class TestBuildMetaBackend: 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': ''} |
