]> granicus.if.org Git - python/commitdiff
Since Guido fiddled Cookie.py to work with doctest, it's a Good Thing to
authorTim Peters <tim.peters@gmail.com>
Fri, 6 Apr 2001 21:20:58 +0000 (21:20 +0000)
committerTim Peters <tim.peters@gmail.com>
Fri, 6 Apr 2001 21:20:58 +0000 (21:20 +0000)
have the std test suite exercise the Cookie doctests too.

Lib/test/output/test_cookie
Lib/test/test_cookie.py

index c04bfee3a9b61f1e01397de3a57142832cacd021..64b9d044c7ac3bd940659ee8dd7b130972a37908 100644 (file)
@@ -29,3 +29,4 @@ Set-Cookie: Customer="WILE_E_COYOTE"; Path=/acme;
         // end hiding -->
         </script>
         
+If anything blows up after this line, it's from Cookie's doctest.
index df592f31fd988b29e67132d4ef3a03731de15ec9..2063dbfe54b42b808aeef585438de779d694887a 100644 (file)
@@ -3,6 +3,7 @@
 from test_support import verify
 import Cookie
 from test_support import verify, verbose
+import doctest
 
 # Currently this only tests SimpleCookie
 
@@ -41,3 +42,6 @@ C.load('Customer="WILE_E_COYOTE"; Version="1"; Path="/acme"')
 verify(C['Customer'].value == 'WILE_E_COYOTE')
 verify(C['Customer']['version'] == '1')
 verify(C['Customer']['path'] == '/acme')
+
+print "If anything blows up after this line, it's from Cookie's doctest."
+doctest.testmod(Cookie)