示例#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)
示例#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)
示例#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)
示例#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)