From e832d01fa66613e8037197861bcd2dd8b3cd9bfe Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Fri, 18 Apr 2014 21:13:06 -0400 Subject: More refactoring of hacked Mako support --- coverage/control.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'coverage/control.py') diff --git a/coverage/control.py b/coverage/control.py index e71547a8..07551ff1 100644 --- a/coverage/control.py +++ b/coverage/control.py @@ -4,7 +4,7 @@ import atexit, os, random, socket, sys from coverage.annotate import AnnotateReporter from coverage.backward import string_class, iitems -from coverage.codeunit import code_unit_factory, CodeUnit +from coverage.codeunit import code_unit_factory, CodeUnit, PythonCodeUnit from coverage.collector import Collector from coverage.config import CoverageConfig from coverage.data import CoverageData @@ -214,7 +214,7 @@ class coverage(object): def _canonical_dir(self, morf): """Return the canonical directory of the module or file `morf`.""" - return os.path.split(CodeUnit(morf, self.file_locator).filename)[0] + return os.path.split(PythonCodeUnit(morf, self.file_locator).filename)[0] def _source_for_file(self, filename): """Return the source file for `filename`.""" @@ -595,7 +595,7 @@ class coverage(object): if not isinstance(it, CodeUnit): it = code_unit_factory(it, self.file_locator)[0] - return it.analysis_class(self, it) + return Analysis(self, it) def report(self, morfs=None, show_missing=True, ignore_errors=None, file=None, # pylint: disable=W0622 -- cgit v1.2.1