diff --git a/ostap/io/tests/test_io_dbases.py b/ostap/io/tests/test_io_dbases.py index 99cf90c6..ce685f5e 100644 --- a/ostap/io/tests/test_io_dbases.py +++ b/ostap/io/tests/test_io_dbases.py @@ -24,14 +24,22 @@ if '__main__' == __name__ : logger = getLogger ( 'test_io_dbases' ) else : logger = getLogger ( __name__ ) # ============================================================================= -characters = "abcdefghijklmnopqrstuvwxyz0123456789_" -# ============================================================================= -## generate random name -def the_name (): - """ Generate random name""" - return ''.join ( random.choices ( characters , k = 8 ) ) -# ============================================================================= - +if (3,0) <= sys.version_info : + characters = "abcdefghijklmnopqrstuvwxyz0123456789_" + # ============================================================================= + ## generate random name + def the_name (): + """ Generate random name""" + return ''.join ( random.choices ( characters , k = 8 ) ) + # ============================================================================= +else : + # ============================================================================= + index = 1 + def _the_name () : + index += 1 + return 'i%08d' % index + # ============================================================================= + dbases = [] # ============================================================================