Skip to content

Commit

Permalink
Fix yaml dependency in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Bultako committed Sep 14, 2018
1 parent 3f4d417 commit 869213e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion gammapy/scripts/downloadclass.py
Expand Up @@ -6,7 +6,6 @@
import logging
import os
import sys
import yaml
from ..extern.six.moves.urllib.request import urlretrieve, urlopen
from ..extern.pathlib import Path

Expand Down Expand Up @@ -159,6 +158,7 @@ def parse_json_tree(self, json_files):
self.listfiles.append(item["path"])

def parse_yaml(self, datasets=False):
import yaml

if datasets:
notebooksfolder = "notebooks-" + self.release
Expand Down
3 changes: 3 additions & 0 deletions gammapy/scripts/tests/test_download.py
Expand Up @@ -3,6 +3,7 @@
from ...utils.testing import run_cli
from ..main import cli
from ...extern.pathlib import Path
from ...utils.testing import requires_dependency
import pytest


Expand All @@ -18,6 +19,7 @@ def test_cli_download_help():


@pytest.mark.xfail
@requires_dependency("yaml")
def test_cli_download_datasets(files_dir):
filename = "data-register.yaml"
option_dest = "--dest=" + str(files_dir)
Expand All @@ -31,6 +33,7 @@ def test_cli_download_datasets(files_dir):


@pytest.mark.xfail
@requires_dependency("yaml")
def test_cli_download_notebooks(files_dir):
release = 'master'
filename = "first_steps.ipynb"
Expand Down

0 comments on commit 869213e

Please sign in to comment.