コード例 #1
0
ファイル: test_solids.py プロジェクト: varokas/dagster-1
def test_shell_script_solid():
    script_dir = os.path.dirname(os.path.abspath(__file__))
    solid = create_shell_script_solid(os.path.join(script_dir, 'test.sh'), name='foobar')
    result = execute_solid(
        solid, run_config={'solids': {'foobar': {'config': {'env': {'MY_ENV_VAR': 'foobar'}}}}},
    )
    assert result.output_values == {'result': 'this is a test message: foobar\n'}
コード例 #2
0
ファイル: test_solids.py プロジェクト: varokas/dagster-1
def test_shell_script_solid_no_config_composite():
    script_dir = os.path.dirname(os.path.abspath(__file__))
    solid = create_shell_script_solid(os.path.join(script_dir, 'test.sh'), name='foobar')

    @composite_solid(
        config_schema={}, config_fn=lambda cfg: {}, output_defs=[OutputDefinition(str, 'result')]
    )
    def composite():
        return solid()

    result = execute_solid(composite)
    assert result.output_values == {'result': 'this is a test message: \n'}
コード例 #3
0
ファイル: test_solids.py プロジェクト: sd2k/dagster
def test_shell_script_solid():
    script_dir = os.path.dirname(os.path.abspath(__file__))
    solid = create_shell_script_solid(os.path.join(script_dir, "test.sh"),
                                      name="foobar")
    result = execute_solid(
        solid,
        run_config={
            "solids": {
                "foobar": {
                    "config": {
                        "env": {
                            "MY_ENV_VAR": "foobar"
                        }
                    }
                }
            }
        },
    )
    assert result.output_values == {
        "result": "this is a test message: foobar\n"
    }
コード例 #4
0
def pipe():
    a = create_shell_script_solid(file_relative_path(__file__,
                                                     "hello_world.sh"),
                                  name="a")
    a()
コード例 #5
0
ファイル: test_solids.py プロジェクト: sd2k/dagster
def test_shell_script_solid_no_config():
    script_dir = os.path.dirname(os.path.abspath(__file__))
    solid = create_shell_script_solid(os.path.join(script_dir, "test.sh"),
                                      name="foobar")
    result = execute_solid(solid)
    assert result.output_values == {"result": "this is a test message: \n"}
コード例 #6
0
ファイル: test_solids.py プロジェクト: varokas/dagster-1
def test_shell_script_solid_no_config():
    script_dir = os.path.dirname(os.path.abspath(__file__))
    solid = create_shell_script_solid(os.path.join(script_dir, 'test.sh'), name='foobar')
    result = execute_solid(solid)
    assert result.output_values == {'result': 'this is a test message: \n'}
コード例 #7
0
def pipe():
    a = create_shell_script_solid(file_relative_path(__file__,
                                                     'hello_world.sh'),
                                  name='a')
    a()