We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5f10714 commit 7a5fd79Copy full SHA for 7a5fd79
2 files changed
odml/util.py
@@ -46,7 +46,7 @@ def format_cardinality(in_val):
46
min_int = isinstance(v_min, int) and v_min >= 0
47
max_int = isinstance(v_max, int) and v_max >= 0
48
49
- if max_int and min_int and v_max > v_min:
+ if max_int and min_int and v_max >= v_min:
50
return v_min, v_max
51
52
if max_int and not v_min:
test/test_util.py
@@ -34,6 +34,10 @@ def test_format_cardinality(self):
34
set_val = (2, 3)
35
self.assertEqual(format_cardinality(set_val), set_val)
36
37
+ # Test exact value tuple set
38
+ set_val = (5, 5)
39
+ self.assertEqual(format_cardinality(set_val), set_val)
40
+
41
# Test set failures
42
with self.assertRaises(ValueError):
43
format_cardinality("a")
0 commit comments