Source

Kiva Editor's Assistant / tests / yearold.py

Diff from to

tests/yearold.py

 from expect import expect
 
 def test_year_old():
+    # All of these are taken from actual Kiva loan descriptions
     expect(u'Mahmoud is a 47-year-old married man from Lebanon.')
-    expect(u'This is 40 year-old Kadiatu.', 'This is 40-year-old Kadiatu.')
-    expect(u'Eman is a 32 years old young woman.', u'Eman is a 32-year-old young woman.')
+    expect(u'This is 40 year-old Kadiatu.',
+           u'This is 40-year-old Kadiatu.')
+    expect(u'Eman is a 32 years old young woman.',
+           u'Eman is a 32-year-old young woman.')
+    expect(u'Yuliana is a 57 year old lady who is originated from Semarang.',
+           u'Yuliana is a 57-year-old lady who is originated from Semarang.')
+    expect(u'Sabah is a 28 years old married female from Madaba, Jordan.',
+           u'Sabah is a 28-year-old married female from Madaba, Jordan.')
 
     # These cases are correct and should remain unchanged.
     expect(u'She is 47 years old.')
     expect(ur'She is a 47-years old farmer.', ur'She is a 47-year-old farmer.')  # ok
     expect(ur'She is a 47 years-old farmer.', ur'She is a 47-year-old farmer.')
     expect(ur'She is a 47-years-old farmer.', ur'She is a 47-year-old farmer.')
-
-    #
-    # Here are the parse trees for all 9 cases:
-    #
-    # 1. She is 47 years old.
-    #
-    # root_informal
-    #   subjh
-    #     bare_npq
-    #       she
-    #         <She 0:3>
-    #     hcomp
-    #       be_c_is
-    #         <is 4:6>
-    #       npadv
-    #         appos
-    #           bare_np
-    #             adjn
-    #               attr_adj_verb_psv_part
-    #                 generic_trans_verb_pas
-    #                   <47 7:9>
-    #               plur_noun_orule
-    #                 year_n1
-    #                   <years 10:15>
-    #           proper_np
-    #             adjn
-    #               old_a1
-    #                 <old 16:19>
-    #               noptcomp
-    #                 generic_year_ne
-    #                   <. 19:20>
-    #