def teardown_function(function): _readers.clear() _writers.clear() _identifiers.clear() _readers.update(ORIGINAL['readers']) _writers.update(ORIGINAL['writers']) _identifiers.update(ORIGINAL['identifiers'])
def teardown_function(function): _readers.clear() _writers.clear() _identifiers.clear() _readers.update(ORIGINAL['readers']) _writers.update(ORIGINAL['writers']) _identifiers.update(ORIGINAL['identifiers'])
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.")
def teardown_function(function): _readers.update(_READERS_ORIGINAL) _writers.update(_WRITERS_ORIGINAL) _identifiers.update(_IDENTIFIERS_ORIGINAL)
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.")
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.")
def teardown_function(function): _readers.update(_READERS_ORIGINAL) _writers.update(_WRITERS_ORIGINAL) _identifiers.update(_IDENTIFIERS_ORIGINAL)
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.")