Skip to content

Commit

Permalink
Make error message for non-existing Enumeration in test conditional (
Browse files Browse the repository at this point in the history
  • Loading branch information
kounelisagis authored Oct 16, 2024
1 parent b29e61d commit f1b09f3
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions tiledb/tests/test_enumeration.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,16 @@ def test_array_schema_enumeration(self):

with self.assertRaises(tiledb.TileDBError) as excinfo:
assert A.enum("enmr3") == []
assert (
"ArraySchema: Unable to check if unknown enumeration is loaded. No enumeration named 'enmr3'."
== str(excinfo.value)
)
if tiledb.libtiledb.version() >= (2, 27):
assert (
"Array: Unable to get enumeration; Enumeration 'enmr3' does not exist."
== str(excinfo.value)
)
else:
assert (
"ArraySchema: Unable to check if unknown enumeration is loaded. No enumeration named 'enmr3'."
== str(excinfo.value)
)
assert attr3.enum_label is None
assert A.attr("attr3").enum_label is None

Expand Down

0 comments on commit f1b09f3

Please sign in to comment.