1- import sys
2-
31import pytest
42import yaml
53
97
108
119@pytest .mark .vcr
12- @pytest .mark .skipif (sys .version_info < (3 , 10 ), reason = "pytest-vcr bug in Python3.8/9" )
1310def test_package_profiles_invalid_local ():
1411 profile = "data/profiles/camtrap.json"
1512 resource = Resource (name = "table" , path = "data/table.csv" )
@@ -23,7 +20,6 @@ def test_package_profiles_invalid_local():
2320
2421
2522@pytest .mark .vcr
26- @pytest .mark .skipif (sys .version_info < (3 , 10 ), reason = "pytest-vcr bug in Python3.8/9" )
2723def test_package_profiles_invalid_local_from_descriptor ():
2824 profile = "data/profiles/camtrap.json"
2925 resource = Resource (name = "table" , path = "data/table.csv" )
@@ -84,7 +80,6 @@ def test_package_profile_type(profile):
8480
8581
8682@pytest .mark .vcr
87- @pytest .mark .skipif (sys .version_info < (3 , 10 ), reason = "pytest-vcr bug in Python3.8/9" )
8883def test_package_profiles_from_descriptor_standards_v1 ():
8984 profile = "data/profiles/camtrap.json"
9085 resource = Resource (name = "table" , path = "data/table.csv" )
@@ -114,8 +109,7 @@ def test_package_profiles_to_descriptor_standards_v1():
114109
115110
116111def test_package_preserver_profile_issue_1480 ():
117- descriptor = yaml .safe_load (
118- """
112+ descriptor = yaml .safe_load ("""
119113 profile: tabular-data-package
120114 resources:
121115 -
@@ -126,16 +120,14 @@ def test_package_preserver_profile_issue_1480():
126120 mediatype: text/csv
127121 encoding: utf-8
128122 schema: schema.json
129- """
130- )
123+ """ )
131124 package = Package (descriptor )
132125 assert package .profile == "tabular-data-package"
133126 assert package .get_resource ("some-table" ).profile == "tabular-data-resource"
134127
135128
136129def test_package_profile_tabular_requirements_issue_1484 ():
137- descriptor = yaml .safe_load (
138- """
130+ descriptor = yaml .safe_load ("""
139131 profile: tabular-data-package
140132 resources:
141133 -
@@ -145,8 +137,7 @@ def test_package_profile_tabular_requirements_issue_1484():
145137 mediatype: text/csv
146138 encoding: utf-8
147139 schema: schema.json
148- """
149- )
140+ """ )
150141 report = Package .validate_descriptor (descriptor )
151142 assert report .flatten (["type" , "note" ]) == [
152143 [
@@ -157,8 +148,7 @@ def test_package_profile_tabular_requirements_issue_1484():
157148
158149
159150def test_package_profile_tabular_requirements_schema_issue_1484 ():
160- descriptor = yaml .safe_load (
161- """
151+ descriptor = yaml .safe_load ("""
162152 profile: tabular-data-package
163153 resources:
164154 -
@@ -168,8 +158,7 @@ def test_package_profile_tabular_requirements_schema_issue_1484():
168158 format: csv
169159 mediatype: text/csv
170160 encoding: utf-8
171- """
172- )
161+ """ )
173162 report = Package .validate_descriptor (descriptor )
174163 assert report .flatten (["type" , "note" ]) == [
175164 [
0 commit comments