From f15f22fd1ac7da4a4ad7dfd21015126420df64d0 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Wed, 3 Jun 2015 14:23:29 -0400 Subject: PyContracts now uses six, so exclude six during testing. --- coverage/control.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'coverage/control.py') diff --git a/coverage/control.py b/coverage/control.py index 4bb6866..d05b844 100644 --- a/coverage/control.py +++ b/coverage/control.py @@ -304,9 +304,11 @@ class Coverage(object): self.cover_dirs = [self._canonical_dir(__file__)] if env.TESTING: # When testing, we use PyContracts, which should be considered - # part of coverage. - import contracts - self.cover_dirs.append(self._canonical_dir(contracts)) + # part of coverage, and it uses six. Exclude those directories just + # as we exclude ourselves. + import contracts, six + for mod in [contracts, six]: + self.cover_dirs.append(self._canonical_dir(mod)) # Set the reporting precision. Numbers.set_precision(self.config.precision) -- cgit v1.2.1