summaryrefslogtreecommitdiff
path: root/nose
diff options
context:
space:
mode:
Diffstat (limited to 'nose')
-rw-r--r--nose/plugins/cover.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/nose/plugins/cover.py b/nose/plugins/cover.py
index 371d9f5..259bf0c 100644
--- a/nose/plugins/cover.py
+++ b/nose/plugins/cover.py
@@ -12,6 +12,7 @@ variable.
"""
import logging
import os
+import re
import sys
from nose.plugins.base import Plugin
from nose.util import src, tolist
@@ -274,7 +275,7 @@ class Coverage(Plugin):
return False
if self.coverPackages:
for package in self.coverPackages:
- if (name.startswith(package)
+ if (re.findall(r'^%s\b' % re.escape(package), name)
and (self.coverTests
or not self.conf.testMatch.search(name))):
log.debug("coverage for %s", name)