Skip to content

Commit

Permalink
Remove hardcoded schema_version glad
Browse files Browse the repository at this point in the history
Removes a hardcoded flag setting the current schema version in testing as the default is to use the most recent version.
  • Loading branch information
ItIsJordan committed Jul 6, 2023
1 parent 6247c64 commit 6e0619c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion testsuite/test_data_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def validator_v0():

@pytest.fixture(scope="module")
def validator_v1():
return DataFileValidator(schema_version='1.1.1')
return DataFileValidator()


####################################################
Expand Down
6 changes: 3 additions & 3 deletions testsuite/test_full_submission_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def validator_v0():

@pytest.fixture()
def validator_v1():
return FullSubmissionValidator(schema_version='1.1.1')
return FullSubmissionValidator()


def test_valid_submission_dir(validator_v1, data_path, capsys):
Expand Down Expand Up @@ -87,7 +87,7 @@ def test_valid_submission_dir_remote_schema(validator_v1, data_path, capsys):


def test_valid_submission_dir_remote_schema_no_autoloading(data_path):
validator = FullSubmissionValidator(schema_version='1.1.1', autoload_remote_schemas=False)
validator = FullSubmissionValidator(autoload_remote_schemas=False)
submission_dir = os.path.join(data_path, 'TestRemoteSubmission')

# Validate without pre-loading schemas - should get an error
Expand All @@ -106,7 +106,7 @@ def test_valid_submission_dir_remote_schema_no_autoloading(data_path):


def test_valid_submission_dir_remote_schema_multiple_loads():
validator = FullSubmissionValidator(schema_version='1.1.1', autoload_remote_schemas=False)
validator = FullSubmissionValidator(autoload_remote_schemas=False)

# Load schema once - should be fine
validator.load_remote_schema(base_url="https://scikit-hep.org/pyhf/schemas/1.0.0", schema_name="workspace.json")
Expand Down
2 changes: 1 addition & 1 deletion testsuite/test_submission_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def validator_v0():

@pytest.fixture(scope="module")
def validator_v1():
return SubmissionFileValidator(schema_version='1.1.1')
return SubmissionFileValidator()


####################################################
Expand Down

0 comments on commit 6e0619c

Please sign in to comment.