forked from ibis-project/ibis
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconftest.py
More file actions
31 lines (22 loc) · 816 Bytes
/
conftest.py
File metadata and controls
31 lines (22 loc) · 816 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import fnmatch
import os
import sys
import pytest
from pathlib import Path
collect_ignore = ['setup.py']
if sys.version_info.major == 2:
this_directory = os.path.dirname(__file__)
bigquery_udf = os.path.join(this_directory, 'ibis', 'bigquery', 'udf')
for root, _, filenames in os.walk(bigquery_udf):
for filename in filenames:
if fnmatch.fnmatch(filename, '*.py'):
collect_ignore.append(os.path.join(root, filename))
@pytest.fixture(scope='session')
def data_directory():
root = Path(__file__).absolute().parent
default = root / 'ci' / 'ibis-testing-data'
datadir = os.environ.get('IBIS_TEST_DATA_DIRECTORY', default)
datadir = Path(datadir)
if not datadir.exists():
pytest.skip('test data directory not found')
return datadir