Commits

Ezio Melotti  committed eea8386

#494: fix wrong linkification and update tests.

  • Participants
  • Parent commits e783166

Comments (0)

Files changed (3)

File extensions/local_replace.py

 
 
 # if the issue number is too big the db will explode -- limit it to 7 digits
-issue_re = re.compile(r'(?P<text>(\#|\b(?<!/)issue)\s*(?P<id>1?\d{1,6}))\b', re.I)
+issue_re = re.compile(r'(?P<text>(\#|\b(?<![-/_])issue)\s*(?P<id>1?\d{1,6}))\b', re.I)
 
 
 class PyDevStringHTMLProperty(StringHTMLProperty):

File extensions/test/local_replace_data.txt

 see <a href="http://www.python.org/dev/peps/pep-3127/#removal-of-old-octal-syntax">http://www.python.org/dev/peps/pep-3127/#removal-of-old-octal-syntax</a>
 see http://docs.python.org/whatsnew/2.6.html#pep-371-the-multiprocessing-package
 see <a href="http://docs.python.org/whatsnew/2.6.html#pep-371-the-multiprocessing-package">http://docs.python.org/whatsnew/2.6.html#pep-371-the-multiprocessing-package</a>
+http://bugs.python.org/file24624/Proposed-fix-of-issue14099-second.patch
+<a href="http://bugs.python.org/file24624/Proposed-fix-of-issue14099-second.patch">http://bugs.python.org/file24624/Proposed-fix-of-issue14099-second.patch</a>
 ##
 ## tracebacks
 File "/usr/lib/python2.7/socket.py", line 553, in create_connection
 see the devguide.
 see the <a href="http://docs.python.org/devguide">devguide</a>.
 see http://docs.python.org/devguide/.
-see <a href="http://docs.python.org/devguide/.">http://docs.python.org/devguide/.</a>
+see <a href="http://docs.python.org/devguide/">http://docs.python.org/devguide/</a>.
 see devguide/triaging.
 see <a href="http://docs.python.org/devguide/triaging">devguide/triaging</a>.
 see devguide/triaging.html.

File extensions/test/test_local_replace.py

 
 if len(sys.argv) != 2:
     sys.exit('Error: You have to provide the path of Roundup in order to run '
-             'the tests (e.g. /opt/tracker-roundup/lib/python2.6/site-packages/).')
+             'the tests (e.g. /opt/tracker-roundup/lib/python2.7/site-packages/).')
 # add to sys.path the dir where roundup is installed (local_replace will try
 # to import it)
 sys.path.append(sys.argv.pop())
 # add the dir where local_replace is (i.e. one level up)
 sys.path.append(os.path.sep.join(dirs[:-1]))
 # add the dir where the roundup tests are
-sys.path.append(os.path.sep.join(dirs[:-4] + ['roundup-src', 'test']))
+sys.path.append(os.path.sep.join(dirs[:-3] + ['roundup', 'test']))
 
 
 from local_replace import PyDevStringHTMLProperty