MCPcopy
hub / github.com/mne-tools/mne-python / test_handle_default

Function test_handle_default

mne/tests/test_defaults.py:14–28  ·  view source on GitHub ↗

Test mutable default.

()

Source from the content-addressed store, hash-verified

12
13
14def test_handle_default():
15 """Test mutable default."""
16 x = deepcopy(_handle_default("scalings"))
17 y = _handle_default("scalings")
18 z = _handle_default("scalings", dict(mag=1, grad=2))
19 w = _handle_default("scalings", {})
20 assert set(x.keys()) == set(y.keys())
21 assert set(x.keys()) == set(z.keys())
22 for key in x.keys():
23 assert x[key] == y[key]
24 assert x[key] == w[key]
25 if key in ("mag", "grad"):
26 assert x[key] != z[key]
27 else:
28 assert x[key] == z[key]
29
30
31def test_si_units():

Callers

nothing calls this directly

Calls 2

_handle_defaultFunction · 0.90
setFunction · 0.85

Tested by

no test coverage detected