Skip to content

Commit

Permalink
Merge pull request #108 from heroxbd/master
Browse files Browse the repository at this point in the history
tests/conftest.py: prepare the testfile if necessary.
  • Loading branch information
uvemas authored Sep 24, 2021
2 parents d3e6b4e + d7dcbb6 commit 2ce8ec2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

import sys

import os

import pytest

import tables
Expand Down Expand Up @@ -32,4 +34,7 @@ def launcher():

@pytest.fixture(scope='module')
def h5file():
return tables.open_file('testfile.h5', 'r')
if not os.path.exists('testfile.h5'):
import create_testfile
yield tables.open_file('testfile.h5', 'r')
os.remove('testfile.h5')

0 comments on commit 2ce8ec2

Please sign in to comment.