Skip to content

Commit

Permalink
Merge pull request #4 from iron3oxide/add-tests
Browse files Browse the repository at this point in the history
feat: Add test for constructing type from string with multi underscore prefix
  • Loading branch information
iron3oxide authored May 14, 2024
2 parents 40b31c2 + e25ac64 commit b8884c0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/test_typeid.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,16 @@ def test_construct_type_from_string_with_prefix_standalone() -> None:
assert isinstance(typeid.suffix, str)


def test_construct_type_from_string_with_multi_underscore_prefix() -> None:
string = "double_prefix_00041061050r3gg28a1c60t3gf"

typeid = TypeID.from_string(string)

assert isinstance(typeid, TypeID)
assert typeid.prefix == "double_prefix"
assert isinstance(typeid.suffix, str)


def test_construct_type_from_invalid_string() -> None:
string = "invalid_string_to_typeid"

Expand Down

0 comments on commit b8884c0

Please sign in to comment.