Loading lib/galaxy/tools/parameters/validation.py +1 −1 Original line number Diff line number Diff line Loading @@ -165,7 +165,7 @@ class InRangeValidator(ExpressionValidator): op1 = "<" if self.exclude_max: op2 = "<" expression = f"float('{self.min}') {op1} value {op2} float('{self.max}')" expression = f"float('{self.min}') {op1} float(value) {op2} float('{self.max}')" if message is None: message = f"Value ('%s') must {'not ' if negate == 'true' else ''}fulfill {expression}" super().__init__(message, expression, negate) Loading test/unit/app/tools/test_parameter_validation.py +2 −2 Original line number Diff line number Diff line Loading @@ -217,11 +217,11 @@ class TestParameterValidation(BaseParameterTestCase): ) p.validate(10) with self.assertRaisesRegex( ValueError, r"Parameter blah: Value \('15'\) must not fulfill float\('10'\) < value <= float\('20'\)" ValueError, r"Parameter blah: Value \('15'\) must not fulfill float\('10'\) < float\(value\) <= float\('20'\)" ): p.validate(15) with self.assertRaisesRegex( ValueError, r"Parameter blah: Value \('20'\) must not fulfill float\('10'\) < value <= float\('20'\)" ValueError, r"Parameter blah: Value \('20'\) must not fulfill float\('10'\) < float\(value\) <= float\('20'\)" ): p.validate(20) p.validate(21) Loading Loading
lib/galaxy/tools/parameters/validation.py +1 −1 Original line number Diff line number Diff line Loading @@ -165,7 +165,7 @@ class InRangeValidator(ExpressionValidator): op1 = "<" if self.exclude_max: op2 = "<" expression = f"float('{self.min}') {op1} value {op2} float('{self.max}')" expression = f"float('{self.min}') {op1} float(value) {op2} float('{self.max}')" if message is None: message = f"Value ('%s') must {'not ' if negate == 'true' else ''}fulfill {expression}" super().__init__(message, expression, negate) Loading
test/unit/app/tools/test_parameter_validation.py +2 −2 Original line number Diff line number Diff line Loading @@ -217,11 +217,11 @@ class TestParameterValidation(BaseParameterTestCase): ) p.validate(10) with self.assertRaisesRegex( ValueError, r"Parameter blah: Value \('15'\) must not fulfill float\('10'\) < value <= float\('20'\)" ValueError, r"Parameter blah: Value \('15'\) must not fulfill float\('10'\) < float\(value\) <= float\('20'\)" ): p.validate(15) with self.assertRaisesRegex( ValueError, r"Parameter blah: Value \('20'\) must not fulfill float\('10'\) < value <= float\('20'\)" ValueError, r"Parameter blah: Value \('20'\) must not fulfill float\('10'\) < float\(value\) <= float\('20'\)" ): p.validate(20) p.validate(21) Loading