changeset 5:6b99523536ee

tests work
author Jeff Hammel <jhammel@mozilla.com>
date Fri, 17 Jun 2011 10:52:29 -0700 (2011-06-17)
parents 23be092e6099
children 0cd69fa6751c
files tests/doctest.txt tests/test.py
diffstat 2 files changed, 7 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/tests/doctest.txt	Fri Jun 17 10:40:51 2011 -0700
+++ b/tests/doctest.txt	Fri Jun 17 10:52:29 2011 -0700
@@ -3,7 +3,7 @@
 
 The obligatory imports::
 
-    >>> from urlmatcher import UrlMatcher
+    >>> from urlmatch import UrlMatcher
 
 Test matching::
 
@@ -12,12 +12,14 @@
     >>> matcher.add('https://www.example.com/foo/')
     >>> matcher.add('https://www.example.net/foo/')
     >>> sorted(matcher.match('example.com/foo/bar'))
-    ['http://www.example.com/foo/bar/fleem', ]
+    ['http://www.example.com/foo/bar/fleem']
     >>> sorted(matcher.match('http://example.com/foo'))
+    ['http://www.example.com/foo/bar/fleem', 'http://www.example.com/foo/blah']
     >>> sorted(matcher.match('example.com'))
-    >>> sorted(matcher.match('example'))
-
+    ['http://www.example.com/foo/bar/fleem', 'http://www.example.com/foo/blah', 'https://www.example.com/foo/']
+    >>> sorted(matcher.match('example')) # -> example.*
+    ['http://www.example.com/foo/bar/fleem', 'http://www.example.com/foo/blah', 'https://www.example.com/foo/', 'https://www.example.net/foo/']
 
 Test url diffs::
 
-    >>> matcher = urlmatcher()
+    >>> matcher = UrlMatcher()
--- a/tests/test.py	Fri Jun 17 10:40:51 2011 -0700
+++ b/tests/test.py	Fri Jun 17 10:52:29 2011 -0700
@@ -9,7 +9,6 @@
 import sys
 from optparse import OptionParser
 
-
 def run_tests(raise_on_error=False, report_first=False):
 
     # add results here