diff options
author | Georg Brandl <georg@python.org> | 2009-07-13 21:28:01 +0200 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2009-07-13 21:28:01 +0200 |
commit | 1c030b415e2d82c71de8da57c3ad89921f94ef9d (patch) | |
tree | 78eb0284e3361c95e53855e582bc523cec4bfc08 /sphinx/ext/coverage.py | |
parent | a1dd4695f3358f3dd57fed05d9910324e80a95c4 (diff) | |
download | sphinx-git-1c030b415e2d82c71de8da57c3ad89921f94ef9d.tar.gz |
With a few disabled features (see XXX), the test suite runs again.
Diffstat (limited to 'sphinx/ext/coverage.py')
-rw-r--r-- | sphinx/ext/coverage.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/sphinx/ext/coverage.py b/sphinx/ext/coverage.py index 964e58eec..6eb9bc8b3 100644 --- a/sphinx/ext/coverage.py +++ b/sphinx/ext/coverage.py @@ -79,6 +79,7 @@ class CoverageBuilder(Builder): def build_c_coverage(self): # Fetch all the info from the header files + c_objects = self.env.domains['c'].data['objects'] for filename in self.c_sourcefiles: undoc = [] f = open(filename, 'r') @@ -88,7 +89,7 @@ class CoverageBuilder(Builder): match = regex.match(line) if match: name = match.groups()[0] - if name not in self.env.descrefs: + if name not in c_objects: for exp in self.c_ignorexps.get(key, ()): if exp.match(name): break @@ -116,7 +117,10 @@ class CoverageBuilder(Builder): op.close() def build_py_coverage(self): - for mod_name in self.env.modules: + objects = self.env.domains['py'].data['objects'] + modules = self.env.domains['py'].data['modules'] + + for mod_name in modules: ignore = False for exp in self.mod_ignorexps: if exp.match(mod_name): @@ -151,7 +155,7 @@ class CoverageBuilder(Builder): full_name = '%s.%s' % (mod_name, name) if inspect.isfunction(obj): - if full_name not in self.env.descrefs: + if full_name not in objects: for exp in self.fun_ignorexps: if exp.match(name): break @@ -162,7 +166,7 @@ class CoverageBuilder(Builder): if exp.match(name): break else: - if full_name not in self.env.descrefs: + if full_name not in objects: # not documented at all classes[name] = [] continue @@ -176,7 +180,7 @@ class CoverageBuilder(Builder): continue full_attr_name = '%s.%s' % (full_name, attr_name) - if full_attr_name not in self.env.descrefs: + if full_attr_name not in objects: attrs.append(attr_name) if attrs: |