Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: assert for test_coerce_type_to_text test #810

Closed
wants to merge 2 commits into from

Conversation

AstrakhantsevaAA
Copy link
Contributor

we have a problem with test tests/common/schema/test_coercion.py test_coerce_type_to_text:

    def test_coerce_type_to_text() -> None:
        assert coerce_value("text", "bool", False) == str(False)
        # double into text
        assert coerce_value("text", "double", -1726.1288) == "-1726.1288"
        # bytes to text (base64)
        assert coerce_value("text", "binary", b'binary string') == "YmluYXJ5IHN0cmluZw=="
        # HexBytes to text (hex with prefix)
>       assert coerce_value("text", "binary", HexBytes(b'binary string')) == "0x62696e61727920737472696e67"
E       AssertionError: assert '62696e61727920737472696e67' == '0x62696e61727920737472696e67'
E         - 0x62696e61727920737472696e67
E         ? --
E         + 62696e61727920737472696e67

HexBytes deleted prepend of 0x from HexBytes().value. PR

Copy link

netlify bot commented Dec 8, 2023

Deploy Preview for dlt-hub-docs canceled.

Name Link
🔨 Latest commit e4083b2
🔍 Latest deploy log https://app.netlify.com/sites/dlt-hub-docs/deploys/657323b60894620008b421f4

@AstrakhantsevaAA AstrakhantsevaAA deleted the fix/common_test_hex branch December 8, 2023 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant