tests: do not leak file descriptors
This commit is contained in:
parent
2ff4ba0720
commit
fef18507c7
|
@ -12,13 +12,13 @@ def pytest_generate_tests(metafunc):
|
|||
if hasattr(metafunc, 'function'):
|
||||
fcode = metafunc.function.__code__
|
||||
if 'visualization' in fcode.co_varnames[:fcode.co_argcount]:
|
||||
tables = json.load(
|
||||
open(
|
||||
with open(
|
||||
os.path.join(
|
||||
os.path.dirname(__file__),
|
||||
'fixtures',
|
||||
'schema2',
|
||||
'tables.json')))
|
||||
'tables.json')) as fd:
|
||||
tables = json.load(fd)
|
||||
metafunc.parametrize(['visualization'], [[x] for x in tables])
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue