Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tests/testutils.py
blob: a4efc0afe9a7553253a5177882af3c64e68c8ca5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import tempfile
import os

def tmpData(data):
    """Put data into a temporary file returning the filename """
    fd, fn = tempfile.mkstemp()
    os.write(fd, data)
    os.close(fd)
    return fn

def waitforindex(obj):
    # wait for any/all index managers associated with object to finish
    # indexing so that tests can do there thing
    obj.complete_indexing()