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

Allow environment variables to be referenced in rc files #97

Closed
nedbat opened this issue Nov 12, 2010 · 1 comment
Closed

Allow environment variables to be referenced in rc files #97

nedbat opened this issue Nov 12, 2010 · 1 comment
Labels
enhancement New feature or request run

Comments

@nedbat
Copy link
Owner

nedbat commented Nov 12, 2010

Originally reported by Geoff Bache (Bitbucket: geoffbache, GitHub: Unknown)


In the process of integrating my test tool TextTest more closely with coverage.py, and trying to make use of rc files, I noticed I would either need to autogenerate them for every test run or be able to refer to environment variables in them.

I'm thinking particularly of the "data_file" and "source" settings. TextTest has its own temporary path structure where it runs tests, which it provides an environment variable for, and it would make sense to point "data_file" at that. Likewise, it knows where the source is, and sets an environment variable for that also. It would be nice to have a static coveragerc file for TextTest rather than needing to generate it each time.

This would be a one-line change: with this line

#!python

cp = configparser.ConfigParser(defaults=os.environ)

in config.py inserted.


@nedbat
Copy link
Owner Author

nedbat commented Nov 25, 2012

Implemented in <<changeset ff298b5a4619 (bb)>>, though with syntax like $WORD and ${WORD}.

@nedbat nedbat closed this as completed Nov 25, 2012
@nedbat nedbat added major enhancement New feature or request run labels Jun 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request run
Projects
None yet
Development

No branches or pull requests

1 participant