Skip to content

Remove site-wide dependency on setuptools in test suite#202

Merged
chrisnovakovic merged 1 commit intoplease-build:masterfrom
chrisnovakovic:rework-site-package-import-test
Nov 7, 2024
Merged

Remove site-wide dependency on setuptools in test suite#202
chrisnovakovic merged 1 commit intoplease-build:masterfrom
chrisnovakovic:rework-site-package-import-test

Conversation

@chrisnovakovic
Copy link
Contributor

One set of tests, in //test/local, ensures that setuptools can be imported when Python is not invoked with the -S option and that it can't be imported when Python is invoked with the -S option. This assumes that setuptools is installed site-wide (i.e., in a directory added to sys.path by the site module), which isn't necessarily the case.

Refactor these tests to check the value of sys.flags.no_site, which is an explicit way to identify whether the -S option was passed to Python.

One set of tests, in `//test/local`, ensures that setuptools can be
imported when Python is not invoked with the `-S` option and that it
can't be imported when Python is invoked with the `-S` option. This
assumes that setuptools is installed site-wide (i.e., in a directory
added to `sys.path` by the site module), which isn't necessarily the
case.

Refactor these tests to check the value of `sys.flags.no_site`, which is
an explicit way to identify whether the `-S` option was passed to
Python.
@chrisnovakovic chrisnovakovic force-pushed the rework-site-package-import-test branch from eaf9726 to 4024297 Compare November 7, 2024 17:05
@chrisnovakovic chrisnovakovic merged commit 358eb11 into please-build:master Nov 7, 2024
@chrisnovakovic chrisnovakovic deleted the rework-site-package-import-test branch November 7, 2024 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants