def test_write_noformat_arbitrary_file(tmpdir):
 _writers.update(_WRITERS_ORIGINAL)
 testfile = str(tmpdir.join(u'foo.example'))
 with pytest.raises(io_registry.IORegistryError) as exc:
  Table().write(testfile)
 assert str(exc.value).startswith(u'Format could not be identified.')

def test_write_noformat_arbitrary_file ( tmpdir ) : _writers . update ( _WRITERS_ORIGINAL ) testfile = str ( tmpdir . join ( u'foo.example' ) ) with pytest . raises ( io_registry . IORegistryError ) as exc : Table ( ) . write ( testfile ) assert str ( exc . value ) . startswith ( u'Format could not be identified.' )
tests that all identifier functions can accept arbitrary files .