コード例 #1
0
ファイル: test_dispatcher.py プロジェクト: trigunawan89/modin
def test_engine_switch():
    execution_engine.put("Test")
    assert EngineDispatcher.get_engine() == PandasOnTestFactory
    assert EngineDispatcher.get_engine().io_cls == "Foo"
    execution_engine.put("Python")  # revert engine to default

    partition_format.put("Test")
    assert EngineDispatcher.get_engine() == TestOnPythonFactory
    assert EngineDispatcher.get_engine().io_cls == "Bar"
    partition_format.put("Pandas")  # revert engine to default
コード例 #2
0
ファイル: test_dispatcher.py プロジェクト: trigunawan89/modin
def test_engine_wrong_factory():
    with pytest.raises(FactoryNotFoundError):
        execution_engine.put("BadEngine")
    execution_engine.put("Python")  # revert engine to default