mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 07:13:02 +04:00
python: fix pytest-cov false warnings by using compile() with full file path in exec_file_wrapper
This commit is contained in:
@@ -5,5 +5,5 @@ import sys
|
||||
if sys.version_info[:2] >= (3, 0):
|
||||
def exec_file_wrapper(fpath, g_vars, l_vars):
|
||||
with open(fpath) as f:
|
||||
code = compile(f.read(), os.path.basename(fpath), 'exec')
|
||||
code = compile(f.read(), fpath, 'exec')
|
||||
exec(code, g_vars, l_vars)
|
||||
|
||||
Reference in New Issue
Block a user