Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
## Unreleased

### Fixed
- Fix the test suite leaving `numpy` removed from `sys.modules` after `test_no_numpy_int_type` runs, which broke any later test importing `numpy` in the same pytest process [[#4852](https://github.com/plotly/plotly.py/issues/4852)]
- Fix `mpl_to_plotly` tick marker mirroring, axis positioning, and trace visibility for twinned and overlaid subplots (such as `twinx` and `twiny`) [[#5310](https://github.com/plotly/plotly.py/pull/5310)], with thanks to @robertoffmoura for the contribution!
- Fix `mpl_to_plotly` losing matplotlib axis line colors by exporting the color of each axis's displayed spine to the plotly x and y axis `linecolor` [[#5311](https://github.com/plotly/plotly.py/pull/5311)], with thanks to @robertoffmoura for the contribution!
- Fix concurrent first access to lazily initialized graph object properties, which could raise `ValueError("Invalid value")` [[#5691](https://github.com/plotly/plotly.py/pull/5691)], with thanks to @hb1915 for the contribution!
Expand Down
13 changes: 9 additions & 4 deletions tests/test_optional/test_utils/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,10 +491,15 @@ def test_no_numpy_int_type(self):
from _plotly_utils.optional_imports import get_module

np = get_module("numpy", should_load=False)
saved_numpy = None
if np:
sys.modules.pop("numpy")
saved_numpy = sys.modules.pop("numpy")

int_type_tuple = _get_int_type()
expected_tuple = (int,)
try:
int_type_tuple = _get_int_type()
expected_tuple = (int,)

self.assertEqual(int_type_tuple, expected_tuple)
self.assertEqual(int_type_tuple, expected_tuple)
finally:
if saved_numpy is not None:
sys.modules["numpy"] = saved_numpy