Ejemplo n.º 1
0
def teardown_function(function):
    _readers.clear()
    _writers.clear()
    _identifiers.clear()
    _readers.update(ORIGINAL['readers'])
    _writers.update(ORIGINAL['writers'])
    _identifiers.update(ORIGINAL['identifiers'])
Ejemplo n.º 2
0
def teardown_function(function):
    _readers.clear()
    _writers.clear()
    _identifiers.clear()
    _readers.update(ORIGINAL['readers'])
    _writers.update(ORIGINAL['writers'])
    _identifiers.update(ORIGINAL['identifiers'])
Ejemplo n.º 3
0
def test_write_noformat_arbitrary():
    """Test that all identifier functions can accept arbitrary input"""
    _identifiers.update(ORIGINAL['identifiers'])
    with pytest.raises(io_registry.IORegistryError) as exc:
        TestData().write(object())
    assert str(exc.value).startswith(
        "Format could not be identified based on the"
        " file name or contents, please provide a"
        " 'format' argument.")
Ejemplo n.º 4
0
def teardown_function(function):
    _readers.update(_READERS_ORIGINAL)
    _writers.update(_WRITERS_ORIGINAL)
    _identifiers.update(_IDENTIFIERS_ORIGINAL)
Ejemplo n.º 5
0
def test_write_noformat_arbitrary():
    """Test that all identifier functions can accept arbitrary input"""
    _identifiers.update(_IDENTIFIERS_ORIGINAL)
    with pytest.raises(io_registry.IORegistryError) as exc:
        TestData().write(object())
    assert str(exc.value).startswith("Format could not be identified.")
Ejemplo n.º 6
0
def test_write_noformat_arbitrary():
    """Test that all identifier functions can accept arbitrary input"""
    _identifiers.update(ORIGINAL['identifiers'])
    with pytest.raises(io_registry.IORegistryError) as exc:
        TestData().write(object())
    assert str(exc.value).startswith("Format could not be identified.")
Ejemplo n.º 7
0
def test_read_noformat_arbitrary():
    """Test that all identifier functions can accept arbitrary input"""
    _identifiers.update(ORIGINAL['identifiers'])
    with pytest.raises(io_registry.IORegistryError) as exc:
        TestData.read(object())
    assert str(exc.value).startswith("Format could not be identified.")
Ejemplo n.º 8
0
def teardown_function(function):
    _readers.update(_READERS_ORIGINAL)
    _writers.update(_WRITERS_ORIGINAL)
    _identifiers.update(_IDENTIFIERS_ORIGINAL)
Ejemplo n.º 9
0
def test_read_noformat_arbitrary():
    """Test that all identifier functions can accept arbitrary input"""
    _identifiers.update(_IDENTIFIERS_ORIGINAL)
    with pytest.raises(io_registry.IORegistryError) as exc:
        TestData.read(object())
    assert str(exc.value).startswith("Format could not be identified.")