~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/testhashcache.py

  • Committer: Robert Collins
  • Date: 2005-09-27 07:24:40 UTC
  • mfrom: (1185.1.41)
  • Revision ID: robertc@robertcollins.net-20050927072440-1bf4d99c3e1db5b3
pair programming worx... merge integration and weave

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
 
 
17
import os
 
18
import time
17
19
from bzrlib.selftest import TestCaseInTempDir
18
20
 
19
21
 
25
27
 
26
28
def pause():
27
29
    if False:
28
 
        # enable this to get more accurate testing
29
 
        import time
30
 
        # allow it to stabilize
31
 
        start = int(time.time())
32
 
        while int(time.time()) == start:
33
 
            time.sleep(0.2)
 
30
        return
 
31
    if os.name == 'nt':
 
32
        time.sleep(3)
 
33
        return
 
34
    # allow it to stabilize
 
35
    start = int(time.time())
 
36
    while int(time.time()) == start:
 
37
        time.sleep(0.2)
34
38
    
35
39
 
36
40
class TestHashCache(TestCaseInTempDir):