From 678750c8f873f32a9a09987463805fe59c829e54 Mon Sep 17 00:00:00 2001 From: Marcin Bachry Date: Sun, 21 Aug 2016 22:07:18 +0200 Subject: [PATCH] Fix importer call --- _pytest/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_pytest/main.py b/_pytest/main.py index 48f5bb6f2..5771a1699 100644 --- a/_pytest/main.py +++ b/_pytest/main.py @@ -687,7 +687,7 @@ class Session(FSCollector): # This method is sometimes invoked when AssertionRewritingHook, which # does not define a get_filename method, is already in place: try: - path = loader.get_filename() + path = loader.get_filename(x) except AttributeError: # Retrieve path from AssertionRewritingHook: path = loader.modules[x][0].co_filename