code: def test_none():
      c = ct.EnsureNone()
      # this should always work
      assert_equal(c(None), None)
      # instance of NoneDeprecated is also None
      assert_equal(c(ct.NoneDeprecated), None)
      # this should always fail
      assert_raises(ValueError, lambda: c("None"))
      assert_raises(ValueError, lambda: c([]))
  
file_path: datalad/datalad/tests/test_constraints.py
imports: from datalad.tests.utils_pytest import assert_equal, assert_raises
  from ..support import constraints
label_desc: Use image node_id 6 for calling a global function with example usage: test_none() without return types