Skip to content

BUG: Option context applies on __enter__ #8925

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

Merged

Conversation

hkleynhans
Copy link
Contributor

Option context no longer overrides options when used outside a with
statement.

Added test TestConfig.test_option_config_scope

Closes #8514

@@ -425,3 +425,27 @@ def f3(key):
options.c = 1
self.assertEqual(len(holder), 1)

def test_option_context_scope(self):
# Ensure that creating a context does not affect the existing
# environment as it is supposed to be used with the `with` statement.
Copy link
Member

Choose a reason for hiding this comment

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

Can you add here the original issue number?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added link to ticket. Thanks.

@hkleynhans hkleynhans force-pushed the fix/8514_option_context_with branch from 11615ce to 3053b52 Compare November 29, 2014 13:27
Option context no longer overrides options when used outside a `with`
statement.

Added test TestConfig.test_option_config_scope

Closes pandas-dev#8514
@hkleynhans hkleynhans force-pushed the fix/8514_option_context_with branch from 3053b52 to f21539b Compare November 29, 2014 13:43
@hkleynhans
Copy link
Contributor Author

All issues were addressed. Thanks.

@jorisvandenbossche
Copy link
Member

Looking good for me!

@jorisvandenbossche
Copy link
Member

merging!

jorisvandenbossche added a commit that referenced this pull request Nov 29, 2014
@jorisvandenbossche jorisvandenbossche merged commit e9ee47c into pandas-dev:master Nov 29, 2014
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.

pd.option_context without 'with' changes option values
3 participants