File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -78,14 +78,6 @@ Empty or unparsable input does not raise an error; it produces a name whose
7878attributes are all empty. Check ``len(name) == 0 `` (or ``str(name) == '' ``)
7979to detect that nothing was parsed.
8080
81- .. doctest ::
82-
83- >>> name = HumanName(" " )
84- >>> len (name)
85- 0
86- >>> str (name)
87- ''
88-
8981
9082Capitalization Support
9183----------------------
Original file line number Diff line number Diff line change @@ -36,6 +36,9 @@ def test_len(self) -> None:
3636 self .m (len (hn ), 5 , hn )
3737 hn = HumanName ("John Doe" )
3838 self .m (len (hn ), 2 , hn )
39+ # empty input parses to an all-empty name; len == 0 is the
40+ # documented emptiness check (see usage.rst)
41+ self .assertEqual (len (HumanName ("" )), 0 )
3942
4043 @pytest .mark .skipif (not dill , reason = "requires python-dill module to test pickling" )
4144 def test_config_pickle (self ) -> None :
You can’t perform that action at this time.
0 commit comments