Esempio 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'])
Esempio 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'])
Esempio 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.")
Esempio n. 4
0
def teardown_function(function):
    _readers.update(_READERS_ORIGINAL)
    _writers.update(_WRITERS_ORIGINAL)
    _identifiers.update(_IDENTIFIERS_ORIGINAL)
Esempio 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.")
Esempio 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.")
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.")
Esempio n. 8
0
def teardown_function(function):
    _readers.update(_READERS_ORIGINAL)
    _writers.update(_WRITERS_ORIGINAL)
    _identifiers.update(_IDENTIFIERS_ORIGINAL)
Esempio 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.")