Skip to content

Commit 2c742e4

Browse files
authored
Improve isolation of README example tests (#65)
1 parent ea2415f commit 2c742e4

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
5555
[\#49](https://github.com/mllam/weather-model-graphs/pull/49),
5656
[\#54](https://github.com/mllam/weather-model-graphs/pull/54), @leifdenby
5757

58+
- Improve isolation of README example tests by executing each code block in an isolated namespace.
59+
[#65](https://github.com/mllam/weather-model-graphs/pull/64) @Shristi-Goel
60+
5861
## [v0.2.0](https://github.com/mllam/weather-model-graphs/releases/tag/v0.2.0)
5962

6063
### Added

tests/test_readme.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ def test_readme_example(codeblock_example: str):
1818
"""
1919
Check that execution of the python code block in the README does not raise an exception.
2020
"""
21-
exec(codeblock_example)
21+
exec(codeblock_example, {})

0 commit comments

Comments
 (0)