Re: Testing dictionary results with doctest

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Paul Rubin

    #1

    Re: Testing dictionary results with doctest

    Joe Strout <joe@strout.net writes:
    >>t.match( "The rain in Spain falls mainly on the train." )
    {'object': 'rain', 'location': 'Spain', 'subloc': 'train'}
    You can compare dictionaries for equality:
    >>t.match( "The rain in Spain falls mainly on the train." ) == \
    {'object': 'rain', 'location': 'Spain', 'subloc': 'train'}
    True
Working...