diff --git a/tests/test_misc.py b/tests/test_misc.py index 19aed85233b4e1690e561c8b0ee061450d93f450..3037b79f568c02099639daec70016fb966064fa2 100644 --- a/tests/test_misc.py +++ b/tests/test_misc.py @@ -26,8 +26,11 @@ @author: tf """ import caosdb as db -from caosdb import Container, Property, RecordType, Record, execute_query, Info, get_connection -from nose.tools import assert_true, assert_not_equals, assert_equals, assert_is_not_none, nottest, assert_raises, with_setup # @UnresolvedImport +from caosdb import (Container, Info, Property, Record, RecordType, + execute_query, get_connection) +from nose.tools import (assert_equals, assert_is_not_none, # @UnresolvedImport + assert_not_equals, assert_raises, assert_true, nottest, + with_setup) def setup(): @@ -286,6 +289,7 @@ def test_long_description(): try: longstr = 'desc_' + while len(longstr) < 100000: longstr += "a" @@ -551,12 +555,15 @@ def test_cache_performance(): t2 = 0.0 n = 10 + while t2 < 30 and n <= results: fetch = Container() i = 0 + for e in c: i += 1 fetch.append(Record(id=e.id)) + if i >= n: break @@ -568,9 +575,11 @@ def test_cache_performance(): fetch = Container() i = 0 + for e in c: i += 1 fetch.append(Record(id=e.id)) + if i >= n: break