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

added env var to tell other code when it's running under testflo #64

Merged
merged 1 commit into from
Feb 14, 2022

Conversation

naylor-b
Copy link
Member

This change was originally in the PR that updates coverage, but that PR is held up because of some issue I haven't had time to look into yet. But Herb needs this now so I'm just splitting it out into its own PR.

@@ -144,6 +144,9 @@ def dir_exclude(d):
return True
return False

# set this so code will know when it's running under testflo
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should you restore the env var after testflo finishes? (Or is this being set on the spawned processes?)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The environment variable appears not to persist even if not explicitly removed. For example, for this python code

import os
os.environ['FOOBAZ'] = '1'
print("FOOBAZ =", os.environ.get('FOOBAZ'))

After running this code and checking the current environment, FOOBAZ isn't found.

@swryan swryan merged commit 03dc435 into OpenMDAO:master Feb 14, 2022
@naylor-b naylor-b deleted the testflo_running_env branch February 14, 2022 14:49
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.

None yet

4 participants