From e93531e45438d632a55c570cdcaac7c93fe1814e Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Fri, 13 Feb 2015 06:28:24 -0500 Subject: Always make the current directory importable. #358 --- coverage/cmdline.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'coverage/cmdline.py') diff --git a/coverage/cmdline.py b/coverage/cmdline.py index 4ef08f1d..2be32947 100644 --- a/coverage/cmdline.py +++ b/coverage/cmdline.py @@ -394,6 +394,10 @@ class CoverageScript(object): if not self.args_ok(options, args): return ERR + # We need to be able to import from the current directory, because + # plugins may try to, for example, to read Django settings. + sys.path[0] = '' + # Listify the list options. source = unshell_list(options.source) omit = unshell_list(options.omit) -- cgit v1.2.1