Skip to content

Commit

Permalink
test_bashlib: use version verbatim
Browse files Browse the repository at this point in the history
  • Loading branch information
bertsky committed Aug 14, 2024
1 parent dd3046e commit 93a742e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/ocrd_utils/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def raw_value(self, name):
description="If set, then the CPU profile is written to this file for later peruse with a analysis tools like snakeviz")

config.add("OCRD_DOWNLOAD_RETRIES",
description="Number of times to retry failed attempts for downloads of workspace files.",
description="Number of times to retry failed attempts for downloads of resource or workspace files.",
validator=int,
parser=int)

Expand Down
4 changes: 1 addition & 3 deletions tests/cli/test_bashlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,8 @@ def test_bashlib_minversion(self):
exit_code, out, err = self.invoke_bash(
"source $(ocrd bashlib filename) && ocrd__minversion 2.29.0")
assert exit_code == 0
(major, minor, patch) = map(int, str(VERSION).split('.'))
version = "%d.%d.%d" % (major, minor + 1, patch)
exit_code, out, err = self.invoke_bash(
"source $(ocrd bashlib filename) && ocrd__minversion " + version)
"source $(ocrd bashlib filename) && ocrd__minversion " + VERSION)
assert exit_code > 0
assert "ERROR: ocrd/core is too old" in err

Expand Down
4 changes: 2 additions & 2 deletions tests/validator/test_ocrd_tool_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def setUp(self):

def test_smoke(self):
report = OcrdToolValidator.validate(self.ocrd_tool)
self.assertTrue(report.is_valid, report)
self.assertTrue(report.is_valid, str(report.errors))

def test_additional_props(self):
self.ocrd_tool['not-allowed'] = 'YUP'
Expand All @@ -48,7 +48,7 @@ def test_file_param_ok(self):
ocrd_tool = json.loads(skeleton)
ocrd_tool['tools']['ocrd-xyz']['parameters'] = {"file-param": {"description": "...", "type": "string", "content-type": 'application/rdf+xml'}}
report = OcrdToolValidator.validate(ocrd_tool)
self.assertTrue(report.is_valid, report)
self.assertTrue(report.is_valid, str(report.errors))

# Not restricted anymore since spec 3.3.0
# def test_file_param_bad_content_types(self):
Expand Down

0 comments on commit 93a742e

Please sign in to comment.