summaryrefslogtreecommitdiff
path: root/setuptools/tests
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2020-01-14 18:45:55 -0500
committerJason R. Coombs <jaraco@jaraco.com>2020-01-14 18:45:55 -0500
commitc389dd169da8ec0efaa8d8e56474835a70cc8a9d (patch)
tree997afe639eadf90babf1186af331ba7c5c855ae8 /setuptools/tests
parent18a3cae3513818d355dbc8c05ff93bbcee09a6d5 (diff)
parentb5022cdbf60e1ba072af3af83c79df657272c56d (diff)
downloadpython-setuptools-git-c389dd169da8ec0efaa8d8e56474835a70cc8a9d.tar.gz
Merge branch 'maint/44.x'
Diffstat (limited to 'setuptools/tests')
-rw-r--r--setuptools/tests/test_build_meta.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py
index 326b4f5d..d68444f6 100644
--- a/setuptools/tests/test_build_meta.py
+++ b/setuptools/tests/test_build_meta.py
@@ -406,6 +406,28 @@ class TestBuildMetaBackend:
assert expected == sorted(actual)
+ _sys_argv_0_passthrough = {
+ 'setup.py': DALS("""
+ import os
+ import sys
+
+ __import__('setuptools').setup(
+ name='foo',
+ version='0.0.0',
+ )
+
+ sys_argv = os.path.abspath(sys.argv[0])
+ file_path = os.path.abspath('setup.py')
+ assert sys_argv == file_path
+ """)
+ }
+
+ def test_sys_argv_passthrough(self, tmpdir_cwd):
+ build_files(self._sys_argv_0_passthrough)
+ build_backend = self.get_build_backend()
+ with pytest.raises(AssertionError):
+ build_backend.build_sdist("temp")
+
class TestBuildMetaLegacyBackend(TestBuildMetaBackend):
backend_name = 'setuptools.build_meta:__legacy__'
@@ -417,3 +439,9 @@ class TestBuildMetaLegacyBackend(TestBuildMetaBackend):
build_backend = self.get_build_backend()
build_backend.build_sdist("temp")
+
+ def test_sys_argv_passthrough(self, tmpdir_cwd):
+ build_files(self._sys_argv_0_passthrough)
+
+ build_backend = self.get_build_backend()
+ build_backend.build_sdist("temp")