We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 62c57cc commit 3e4c168Copy full SHA for 3e4c168
1 file changed
tests/test_source.py
@@ -9,7 +9,10 @@
9
from unittest import mock
10
11
import pytest
12
-from ruamel import yaml
+try:
13
+ from ruamel import yaml
14
+except ImportError:
15
+ yaml = None
16
17
from structa.analyzer import ValidationWarning
18
from structa.source import Source
@@ -144,6 +147,7 @@ def test_source_json_data(tmpdir, table):
144
147
assert s.data == table
145
148
146
149
150
+@pytest.mark.skipif(yaml is None, reason="Requires ruamel.yaml")
151
def test_source_yaml_data(tmpdir, table):
152
data_file = str(tmpdir.join('data.yaml'))
153
with open(data_file, 'w', encoding='utf-8') as f:
0 commit comments