66
77# General
88
9+ # Note: to test parallel validation, do not use foreign keys to prevent an
10+ # automatic fallback on single-core execution
11+
912
1013@pytest .mark .ci
1114def test_package_validate_parallel_from_dict ():
12- with open ("data/package/ datapackage.json" ) as file :
13- package = Package (json .load (file ), basepath = "data/package " )
15+ with open ("data/datapackage.json" ) as file :
16+ package = Package (json .load (file ), basepath = "data" )
1417 report = package .validate (parallel = True )
1518 assert report .valid
1619
1720
1821@pytest .mark .ci
1922def test_package_validate_parallel_from_dict_invalid ():
20- with open ("data/invalid/datapackage .json" ) as file :
23+ with open ("data/invalid/datapackage_no_foreign_key .json" ) as file :
2124 package = Package (json .load (file ), basepath = "data/invalid" )
2225 report = package .validate (parallel = True )
2326 assert report .flatten (["taskNumber" , "rowNumber" , "fieldNumber" , "type" ]) == [
@@ -29,7 +32,7 @@ def test_package_validate_parallel_from_dict_invalid():
2932
3033@pytest .mark .ci
3134def test_package_validate_with_parallel ():
32- package = Package ("data/invalid/datapackage .json" )
35+ package = Package ("data/invalid/datapackage_no_foreign_key .json" )
3336 report = package .validate (parallel = True )
3437 assert report .flatten (["taskNumber" , "rowNumber" , "fieldNumber" , "type" ]) == [
3538 [1 , 3 , None , "blank-row" ],
0 commit comments