code: def test_str_min_len():
      c = ct.EnsureStr(min_len=1)
      assert_equal(c("hello"), "hello")
      assert_equal(c("h"), "h")
      assert_raises(ValueError, c, "")
  
      c = ct.EnsureStr(min_len=2)
      assert_equal(c("hello"), "hello")
      assert_raises(ValueError, c, "h")
  
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 5 for calling a global function with example usage: test_str_min_len() without return types