Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support running tests in more environments #84

Merged
merged 1 commit into from
Aug 8, 2023
Merged

Support running tests in more environments #84

merged 1 commit into from
Aug 8, 2023

Conversation

tjni
Copy link

@tjni tjni commented Aug 7, 2023

  1. Support running tests in test runners that do not import setuptools prior to running the test.
  2. Pass along PATH and PYTHONPATH when running setup.py in a new process with with a new environment.

I'm working on packaging this in nixpkgs, which does not use virtual environments. Instead, we construct a PYTHONPATH from all depended upon packages, which means we do not always have setuptools available and need that environment variable propagated in child processes.

@tjni tjni requested a review from dolfinus as a code owner August 7, 2023 23:57
@codecov
Copy link

codecov bot commented Aug 8, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.01% 🎉

Comparison is base (ba4f329) 92.28% compared to head (255ef4a) 92.30%.

❗ Current head 255ef4a differs from pull request most recent head 921a0ed. Consider uploading reports for the commit 921a0ed to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #84      +/-   ##
==========================================
+ Coverage   92.28%   92.30%   +0.01%     
==========================================
  Files           1        1              
  Lines         389      390       +1     
  Branches       62       62              
==========================================
+ Hits          359      360       +1     
  Misses         25       25              
  Partials        5        5              
Files Changed Coverage Δ
setuptools_git_versioning.py 92.30% <100.00%> (+0.01%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dolfinus
Copy link
Owner

dolfinus commented Aug 8, 2023

Hi, thank you for your contribution!

tests/lib/util.py Outdated Show resolved Hide resolved
1. Support running tests in test runners that do not import setuptools
   prior to running the test.

2. Pass along PATH and PYTHONPATH when running setup.py in a new process
   with with a new environment.
@dolfinus dolfinus enabled auto-merge (squash) August 8, 2023 09:38
@dolfinus dolfinus merged commit ab037cb into dolfinus:master Aug 8, 2023
15 checks passed
@dolfinus
Copy link
Owner

dolfinus commented Aug 8, 2023

Added to v1.13.5

@tjni tjni deleted the more-self-contained-tests branch August 8, 2023 15:26
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