def test_shorter_than():
 assert (hug.types.shorter_than(10)('hi there') == 'hi there')
 assert (hug.types.shorter_than(10)(1) == '1')
 assert (hug.types.shorter_than(10)('') == '')
 assert ('10' in hug.types.shorter_than(10).__doc__)
 with pytest.raises(ValueError):
  assert hug.types.shorter_than(10)('there is quite a bit of text here, in fact way more than allowed')

def test_shorter_than ( ) : assert ( hug . types . shorter_than ( 10 ) ( 'hi there' ) == 'hi there' ) assert ( hug . types . shorter_than ( 10 ) ( 1 ) == '1' ) assert ( hug . types . shorter_than ( 10 ) ( '' ) == '' ) assert ( '10' in hug . types . shorter_than ( 10 ) . __doc__ ) with pytest . raises ( ValueError ) : assert hug . types . shorter_than ( 10 ) ( 'there is quite a bit of text here, in fact way more than allowed' )
tests that hugs shorter than type successfully limits the values passed in .