Exemplo n.º 1
0
def test_get_preprocessor_with_default():
    """
    Assert that getting the preprocessor without setting it returns the default
    preprocessor.
    """
    config.reset()
    assert isinstance(config.get_preprocessor(), BasePreProcessor)
Exemplo n.º 2
0
def test_set_builder_default():
    """
    Assert that the default builder is set when no explicit argument is
    provided.
    """
    config.reset()
    config.set_builder(push=False)
    assert isinstance(config.get_builder(
        config.get_preprocessor()), AppendBuilder)
Exemplo n.º 3
0
def test_set_builder():
    """Assert that a custom builder can be provided."""
    config.reset()
    config.set_builder('docker', push=False)
    assert isinstance(config.get_builder(
        config.get_preprocessor()), DockerBuilder)
Exemplo n.º 4
0
def test_set_preprocessor():
    """Assert that a custom preprocessor can be provided."""
    config.reset()
    config.set_preprocessor('notebook')
    assert isinstance(config.get_preprocessor(), ConvertNotebookPreprocessor)