def test_simple_search(pg_xlog):
 name = (('1' * 8) * 3)
 pg_xlog.touch(name, '.ready')
 segs = worker.WalSegment.from_ready_archive_status('pg_xlog')
 assert (next(segs).path == ('pg_xlog/' + name))
 with pytest.raises(StopIteration):
  next(segs)

def test_simple_search ( pg_xlog ) : name = ( ( '1' * 8 ) * 3 ) pg_xlog . touch ( name , '.ready' ) segs = worker . WalSegment . from_ready_archive_status ( 'pg_xlog' ) assert ( next ( segs ) . path == ( 'pg_xlog/' + name ) ) with pytest . raises ( StopIteration ) : next ( segs )
must find a .