[Python-checkins] CVS: python/dist/src/Lib/test/output test_difflib,1.1,1.2 test_doctest,1.4,1.5

Tim Peters tim_one@users.sourceforge.net
Wed, 21 Mar 2001 15:08:01 -0800


Update of /cvsroot/python/python/dist/src/Lib/test/output
In directory usw-pr-cvs1:/tmp/cvs-serv4225/python/dist/src/Lib/test/output

Modified Files:
	test_difflib test_doctest 
Log Message:
Changed doctest to run tests in alphabetic order of name.
This makes verbose-mode output easier to dig thru, and removes an accidental
dependence on the order of dict.items() (made visible by recent changes to
dictobject.c).


Index: test_difflib
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/output/test_difflib,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** test_difflib	2001/02/10 08:00:53	1.1
--- test_difflib	2001/03/21 23:07:59	1.2
***************
*** 157,160 ****
--- 157,168 ----
  ok
  0 of 6 examples failed in difflib.SequenceMatcher.find_longest_match.__doc__
+ Running difflib.SequenceMatcher.get_matching_blocks.__doc__
+ Trying: s = SequenceMatcher(None, "abxcd", "abcd")
+ Expecting: nothing
+ ok
+ Trying: s.get_matching_blocks()
+ Expecting: [(0, 0, 2), (3, 2, 2), (5, 4, 0)]
+ ok
+ 0 of 2 examples failed in difflib.SequenceMatcher.get_matching_blocks.__doc__
  Running difflib.SequenceMatcher.get_opcodes.__doc__
  Trying: a = "qabxcd"
***************
*** 181,189 ****
  Running difflib.SequenceMatcher.quick_ratio.__doc__
  0 of 0 examples failed in difflib.SequenceMatcher.quick_ratio.__doc__
! Running difflib.SequenceMatcher.set_seqs.__doc__
! Trying: s = SequenceMatcher()
! Expecting: nothing
! ok
! Trying: s.set_seqs("abcd", "bcde")
  Expecting: nothing
  ok
--- 189,194 ----
  Running difflib.SequenceMatcher.quick_ratio.__doc__
  0 of 0 examples failed in difflib.SequenceMatcher.quick_ratio.__doc__
! Running difflib.SequenceMatcher.ratio.__doc__
! Trying: s = SequenceMatcher(None, "abcd", "bcde")
  Expecting: nothing
  ok
***************
*** 191,196 ****
  Expecting: 0.75
  ok
! 0 of 3 examples failed in difflib.SequenceMatcher.set_seqs.__doc__
! Running difflib.SequenceMatcher.set_seq2.__doc__
  Trying: s = SequenceMatcher(None, "abcd", "bcde")
  Expecting: nothing
--- 196,209 ----
  Expecting: 0.75
  ok
! Trying: s.quick_ratio()
! Expecting: 0.75
! ok
! Trying: s.real_quick_ratio()
! Expecting: 1.0
! ok
! 0 of 4 examples failed in difflib.SequenceMatcher.ratio.__doc__
! Running difflib.SequenceMatcher.real_quick_ratio.__doc__
! 0 of 0 examples failed in difflib.SequenceMatcher.real_quick_ratio.__doc__
! Running difflib.SequenceMatcher.set_seq1.__doc__
  Trying: s = SequenceMatcher(None, "abcd", "bcde")
  Expecting: nothing
***************
*** 199,203 ****
  Expecting: 0.75
  ok
! Trying: s.set_seq2("abcd")
  Expecting: nothing
  ok
--- 212,216 ----
  Expecting: 0.75
  ok
! Trying: s.set_seq1("bcde")
  Expecting: nothing
  ok
***************
*** 205,210 ****
  Expecting: 1.0
  ok
! 0 of 4 examples failed in difflib.SequenceMatcher.set_seq2.__doc__
! Running difflib.SequenceMatcher.set_seq1.__doc__
  Trying: s = SequenceMatcher(None, "abcd", "bcde")
  Expecting: nothing
--- 218,223 ----
  Expecting: 1.0
  ok
! 0 of 4 examples failed in difflib.SequenceMatcher.set_seq1.__doc__
! Running difflib.SequenceMatcher.set_seq2.__doc__
  Trying: s = SequenceMatcher(None, "abcd", "bcde")
  Expecting: nothing
***************
*** 213,217 ****
  Expecting: 0.75
  ok
! Trying: s.set_seq1("bcde")
  Expecting: nothing
  ok
--- 226,230 ----
  Expecting: 0.75
  ok
! Trying: s.set_seq2("abcd")
  Expecting: nothing
  ok
***************
*** 219,247 ****
  Expecting: 1.0
  ok
! 0 of 4 examples failed in difflib.SequenceMatcher.set_seq1.__doc__
! Running difflib.SequenceMatcher.get_matching_blocks.__doc__
! Trying: s = SequenceMatcher(None, "abxcd", "abcd")
  Expecting: nothing
- ok
- Trying: s.get_matching_blocks()
- Expecting: [(0, 0, 2), (3, 2, 2), (5, 4, 0)]
  ok
! 0 of 2 examples failed in difflib.SequenceMatcher.get_matching_blocks.__doc__
! Running difflib.SequenceMatcher.real_quick_ratio.__doc__
! 0 of 0 examples failed in difflib.SequenceMatcher.real_quick_ratio.__doc__
! Running difflib.SequenceMatcher.ratio.__doc__
! Trying: s = SequenceMatcher(None, "abcd", "bcde")
  Expecting: nothing
  ok
  Trying: s.ratio()
  Expecting: 0.75
- ok
- Trying: s.quick_ratio()
- Expecting: 0.75
  ok
! Trying: s.real_quick_ratio()
! Expecting: 1.0
! ok
! 0 of 4 examples failed in difflib.SequenceMatcher.ratio.__doc__
  Running difflib.get_close_matches.__doc__
  Trying: get_close_matches("appel", ["ape", "apple", "peach", "puppy"])
--- 232,247 ----
  Expecting: 1.0
  ok
! 0 of 4 examples failed in difflib.SequenceMatcher.set_seq2.__doc__
! Running difflib.SequenceMatcher.set_seqs.__doc__
! Trying: s = SequenceMatcher()
  Expecting: nothing
  ok
! Trying: s.set_seqs("abcd", "bcde")
  Expecting: nothing
  ok
  Trying: s.ratio()
  Expecting: 0.75
  ok
! 0 of 3 examples failed in difflib.SequenceMatcher.set_seqs.__doc__
  Running difflib.get_close_matches.__doc__
  Trying: get_close_matches("appel", ["ape", "apple", "peach", "puppy"])

Index: test_doctest
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/output/test_doctest,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** test_doctest	2001/03/18 20:14:25	1.4
--- test_doctest	2001/03/21 23:07:59	1.5
***************
*** 89,151 ****
  Running doctest.Tester.__init__.__doc__
  0 of 0 examples failed in doctest.Tester.__init__.__doc__
- Running doctest.Tester.run__test__.__doc__
- 0 of 0 examples failed in doctest.Tester.run__test__.__doc__
- Running doctest.Tester.runstring.__doc__
- Trying: t = Tester(globs={}, verbose=1)
- Expecting: nothing
- ok
- Trying:
- test = r'''
-    # just an example
-    >>> x = 1 + 2
-    >>> x
-    3
- '''
- Expecting: nothing
- ok
- Trying: t.runstring(test, "Example")
- Expecting:
- Running string Example
- Trying: x = 1 + 2
- Expecting: nothing
- ok
- Trying: x
- Expecting: 3
- ok
- 0 of 2 examples failed in string Example
- (0, 2)
- ok
- 0 of 3 examples failed in doctest.Tester.runstring.__doc__
- Running doctest.Tester.summarize.__doc__
- 0 of 0 examples failed in doctest.Tester.summarize.__doc__
- Running doctest.Tester.rundict.__doc__
- Trying:
- def _f():
-    '''>>> assert 1 == 1
-    '''
- Expecting: nothing
- ok
- Trying:
- def g():
-    '''>>> assert 2 != 1
-    '''
- Expecting: nothing
- ok
- Trying: d = {"_f": _f, "g": g}
- Expecting: nothing
- ok
- Trying: t = Tester(globs={}, verbose=0)
- Expecting: nothing
- ok
- Trying: t.rundict(d, "rundict_test")  # _f is skipped
- Expecting: (0, 1)
- ok
- Trying: t = Tester(globs={}, verbose=0, isprivate=lambda x,y: 0)
- Expecting: nothing
- ok
- Trying: t.rundict(d, "rundict_test_pvt")  # both are searched
- Expecting: (0, 2)
- ok
- 0 of 7 examples failed in doctest.Tester.rundict.__doc__
  Running doctest.Tester.merge.__doc__
  Trying: from doctest import Tester
--- 89,92 ----
***************
*** 198,201 ****
--- 139,173 ----
  ok
  0 of 10 examples failed in doctest.Tester.merge.__doc__
+ Running doctest.Tester.run__test__.__doc__
+ 0 of 0 examples failed in doctest.Tester.run__test__.__doc__
+ Running doctest.Tester.rundict.__doc__
+ Trying:
+ def _f():
+    '''>>> assert 1 == 1
+    '''
+ Expecting: nothing
+ ok
+ Trying:
+ def g():
+    '''>>> assert 2 != 1
+    '''
+ Expecting: nothing
+ ok
+ Trying: d = {"_f": _f, "g": g}
+ Expecting: nothing
+ ok
+ Trying: t = Tester(globs={}, verbose=0)
+ Expecting: nothing
+ ok
+ Trying: t.rundict(d, "rundict_test")  # _f is skipped
+ Expecting: (0, 1)
+ ok
+ Trying: t = Tester(globs={}, verbose=0, isprivate=lambda x,y: 0)
+ Expecting: nothing
+ ok
+ Trying: t.rundict(d, "rundict_test_pvt")  # both are searched
+ Expecting: (0, 2)
+ ok
+ 0 of 7 examples failed in doctest.Tester.rundict.__doc__
  Running doctest.Tester.rundoc.__doc__
  Trying: t = Tester(globs={}, verbose=0)
***************
*** 214,217 ****
--- 186,217 ----
  ok
  0 of 3 examples failed in doctest.Tester.rundoc.__doc__
+ Running doctest.Tester.runstring.__doc__
+ Trying: t = Tester(globs={}, verbose=1)
+ Expecting: nothing
+ ok
+ Trying:
+ test = r'''
+    # just an example
+    >>> x = 1 + 2
+    >>> x
+    3
+ '''
+ Expecting: nothing
+ ok
+ Trying: t.runstring(test, "Example")
+ Expecting:
+ Running string Example
+ Trying: x = 1 + 2
+ Expecting: nothing
+ ok
+ Trying: x
+ Expecting: 3
+ ok
+ 0 of 2 examples failed in string Example
+ (0, 2)
+ ok
+ 0 of 3 examples failed in doctest.Tester.runstring.__doc__
+ Running doctest.Tester.summarize.__doc__
+ 0 of 0 examples failed in doctest.Tester.summarize.__doc__
  Running doctest.is_private.__doc__
  Trying: is_private("a.b", "my_func")
***************
*** 249,260 ****
  ok
  0 of 2 examples failed in doctest.__test__._TestClass.__doc__
- Running doctest.__test__._TestClass.get.__doc__
- Trying: x = _TestClass(-42)
- Expecting: nothing
- ok
- Trying: print x.get()
- Expecting: -42
- ok
- 0 of 2 examples failed in doctest.__test__._TestClass.get.__doc__
  Running doctest.__test__._TestClass.__init__.__doc__
  Trying: t = _TestClass(123)
--- 249,252 ----
***************
*** 265,268 ****
--- 257,268 ----
  ok
  0 of 2 examples failed in doctest.__test__._TestClass.__init__.__doc__
+ Running doctest.__test__._TestClass.get.__doc__
+ Trying: x = _TestClass(-42)
+ Expecting: nothing
+ ok
+ Trying: print x.get()
+ Expecting: -42
+ ok
+ 0 of 2 examples failed in doctest.__test__._TestClass.get.__doc__
  Running doctest.__test__._TestClass.square.__doc__
  Trying: _TestClass(13).square().get()