mirror of
https://github.com/rasterio/rasterio.git
synced 2025-12-08 17:36:12 +00:00
Test fix.
This commit is contained in:
parent
db8fe2381f
commit
94162bb012
@ -302,16 +302,16 @@ def test_env_discovery():
|
||||
# Start an environment and overwrite the value that should persist
|
||||
with rasterio.Env(key=True):
|
||||
assert get_gdal_config('key') is True
|
||||
assert rasterio.env._discovered_options == {'key', 'ON'}
|
||||
assert rasterio.env._discovered_options == {'key': 'ON'}
|
||||
|
||||
# Start another nested environment, again overwriting the value
|
||||
# that should persist
|
||||
with rasterio.Env(key=False):
|
||||
assert rasterio.env._discovered_options == {'key', 'ON'}
|
||||
assert rasterio.env._discovered_options == {'key': 'ON'}
|
||||
assert get_gdal_config('key') is False
|
||||
|
||||
# Ensure the outer state is restored.
|
||||
assert rasterio.env._discovered_options == {'key', 'ON'}
|
||||
assert rasterio.env._discovered_options == {'key': 'ON'}
|
||||
assert get_gdal_config('key') is True
|
||||
|
||||
# Ensure the discovered value remains unchanged.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user