From 819942e96451ebc9664a6a82ef02e7f1745b8f1a Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Tue, 21 Jun 2016 12:28:36 +0200 Subject: [PATCH] Return explicit None from rewrite hook's find_module --- _pytest/assertion/rewrite.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_pytest/assertion/rewrite.py b/_pytest/assertion/rewrite.py index b85ca686cf9..fd4f66cd0d5 100644 --- a/_pytest/assertion/rewrite.py +++ b/_pytest/assertion/rewrite.py @@ -87,7 +87,7 @@ def find_module(self, name, path=None): fn_pypath = py.path.local(fn) if not self._should_rewrite(fn_pypath, state): - return + return None # The requested module looks like a test file, so rewrite it. This is # the most magical part of the process: load the source, rewrite the