Skip to content

Commit 7688fdd

Browse files
test: Add test for native MySQL unsigned types pass-through
- Tests that 'int unsigned', 'bigint unsigned', etc. are allowed - Documents that these are MySQL-specific, not portable - Users should prefer signed core types for compatibility Also bump version to 2.0.0a22
1 parent 825d75e commit 7688fdd

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

src/datajoint/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# version bump auto managed by Github Actions:
22
# label_prs.yaml(prep), release.yaml(bump), post_release.yaml(edit)
33
# manually set this version will be eventually overwritten by the above actions
4-
__version__ = "2.0.0a21"
4+
__version__ = "2.0.0a22"

tests/integration/test_type_aliases.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,26 @@ def test_native_types_still_work(self, native_type, expected_category):
6565
category = match_type(native_type)
6666
assert category == expected_category
6767

68+
@pytest.mark.parametrize(
69+
"native_type,expected_category",
70+
[
71+
("int unsigned", "INTEGER"),
72+
("bigint unsigned", "INTEGER"),
73+
("smallint unsigned", "INTEGER"),
74+
("tinyint unsigned", "INTEGER"),
75+
],
76+
)
77+
def test_native_unsigned_types_pass_through(self, native_type, expected_category):
78+
"""
79+
Test that native MySQL unsigned types are allowed as pass-through.
80+
81+
Note: These are MySQL-specific and not portable to PostgreSQL.
82+
Users should prefer signed core types (int8, int16, int32, int64)
83+
for cross-database compatibility.
84+
"""
85+
category = match_type(native_type)
86+
assert category == expected_category
87+
6888

6989
class TestTypeAliasTableCreation:
7090
"""Test table creation with type aliases."""

0 commit comments

Comments
 (0)