Provide sane defults for YAML tests

This commit is contained in:
Honza Kral
2013-07-31 17:51:42 +02:00
parent 3679018d80
commit 388a56ea2c
2 changed files with 19 additions and 6 deletions
+13 -1
View File
@@ -29,9 +29,21 @@ CMD = """
server = None
pidfile = tempfile.mktemp()
from os import environ
from os.path import join, dirname, pardir, exists
YAML_DIR = environ.get(
'YAML_TEST_DIR',
join(
dirname(__file__),
pardir, pardir, pardir,
'elasticsearch-rest-api-spec', 'test'
)
)
def setup():
# no integration tests, skip starting the server
if 'YAML_TEST_DIR' not in os.environ:
if not exists(YAML_DIR):
raise SkipTest('')
global server