MCPcopy Create free account
hub / github.com/ipython/ipython / simulate_numpy_not_installed

Function simulate_numpy_not_installed

IPython/lib/tests/test_display.py:236–241  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

234 lambda: display.Audio([-1.001], rate=44100, normalize=False))
235
236def simulate_numpy_not_installed():
237 try:
238 import numpy
239 return mock.patch('numpy.array', mock.MagicMock(side_effect=ImportError))
240 except ModuleNotFoundError:
241 return lambda x:x
242
243@simulate_numpy_not_installed()
244class TestAudioDataWithoutNumpy(TestAudioDataWithNumpy):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected