Johan B.W. de Vries f8d107f4fa Replaces did_construct with a proper router
By annotating types with the constructor application
that was used to create them.

Later on we can use the router to replace compiler's
INSTANCES or for user defined types.
2025-05-10 16:49:10 +02:00

31 lines
535 B
Python

import pytest
from ..helpers import Suite
@pytest.mark.integration_test
def test_bytes_export_constant():
code_py = """
CONSTANT: bytes = b'Hello'
@exported
def testEntry() -> bytes:
return CONSTANT
"""
result = Suite(code_py).run_code()
assert b"Hello" == result.returned_value
@pytest.mark.integration_test
def test_bytes_export_instantiation():
code_py = """
@exported
def testEntry() -> bytes:
return b'Hello'
"""
result = Suite(code_py).run_code()
assert b"Hello" == result.returned_value