def test_read_noformat_arbitrary_file(tmpdir):
 _readers.update(_READERS_ORIGINAL)
 testfile = str(tmpdir.join(u'foo.example'))
 with open(testfile, u'w') as f:
  f.write(u'Hello world')
 with pytest.raises(io_registry.IORegistryError) as exc:
  Table.read(testfile)
 assert str(exc.value).startswith(u'Format could not be identified.')

def test_read_noformat_arbitrary_file ( tmpdir ) : _readers . update ( _READERS_ORIGINAL ) testfile = str ( tmpdir . join ( u'foo.example' ) ) with open ( testfile , u'w' ) as f : f . write ( u'Hello world' ) with pytest . raises ( io_registry . IORegistryError ) as exc : Table . read ( testfile ) assert str ( exc . value ) . startswith ( u'Format could not be identified.' )
tests that all identifier functions can accept arbitrary files .