def test_environment():

    @task(environment={'FOO': 'foofoo', 'BAZ': 'baz'})
    def t1(a: int) -> str:
        a = (a + 2)
        return ("now it's " + str(a))

    @workflow
    def my_wf(a: int) -> str:
        x = t1(a=a)
        return x
    serialization_settings = context_manager.SerializationSettings(project='test_proj', domain='test_domain', version='abc', image_config=ImageConfig(Image(name='name', fqn='image', tag='name')), env={'FOO': 'foo', 'BAR': 'bar'})
    with context_manager.FlyteContext.current_context().new_compilation_context():
        sdk_task = get_serializable(serialization_settings, t1)
        assert (sdk_task.container.env == {'FOO': 'foofoo', 'BAR': 'bar', 'BAZ': 'baz'})
def test_environment():

    @task(environment={'FOO': 'foofoo', 'BAZ': 'baz'})
    def t1(a: int) -> str:
        a = (a + 2)
        return ("now it's " + str(a))

    @workflow
    def my_wf(a: int) -> str:
        x = t1(a=a)
        return x
    serialization_settings = context_manager.SerializationSettings(project='test_proj', domain='test_domain', version='abc', image_config=ImageConfig(Image(name='name', fqn='image', tag='name')), env={'FOO': 'foo', 'BAR': 'bar'})
    with context_manager.FlyteContext.current_context().new_compilation_context():
        sdk_task = get_serializable(serialization_settings, t1)
        assert (sdk_task.container.env == {'FOO': 'foofoo', 'BAR': 'bar', 'BAZ': 'baz'})