From 3672e43632c3387e746bcb93e40e86ab30446d0c Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Mon, 21 Jun 2010 09:49:14 -0400 Subject: Add some __repr__ methods to help when debugging. --- coverage/files.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'coverage/files.py') diff --git a/coverage/files.py b/coverage/files.py index d74b4d7..741b456 100644 --- a/coverage/files.py +++ b/coverage/files.py @@ -83,6 +83,9 @@ class TreeMatcher(object): def __init__(self, directories): self.dirs = directories[:] + def __repr__(self): + return "" % self.dirs + def add(self, directory): """Add another directory to the list we match for.""" self.dirs.append(directory) @@ -104,6 +107,9 @@ class FnmatchMatcher(object): def __init__(self, pats): self.pats = pats[:] + def __repr__(self): + return "" % self.pats + def match(self, fpath): """Does `fpath` match one of our filename patterns?""" for pat in self.pats: -- cgit v1.2.1