@@ -14,29 +14,29 @@ def __init__(self, provider_modules, duration_factor):
1414 self .provider_modules = provider_modules
1515 self .tests = [getattr (self , name )
1616 for name in dir (self )
17- if name .startswith (' test' )]
17+ if name .startswith (" test" )]
1818 self .total_time = 0
1919 self .duration_factor = duration_factor
2020
2121 def run (self ):
2222 """Run all tests for all provider modules."""
2323 for module in self .provider_modules :
24- print (' \n ' )
25- print (' Running tests for module - "{module}":'
24+ print (" \n " )
25+ print (" Running tests for module - \ " {module}\" :"
2626 .format (module = module .__name__ ))
2727
2828 gc .disable ()
2929 for test in self .tests :
3030 start_time = time .time ()
3131 test (module )
3232 self .total_time = time .time () - start_time
33- print (' Test "{test}" took - {time}'
33+ print (" Test \ " {test}\ " took - {time}"
3434 .format (test = test .__name__ ,
3535 time = self .total_time ))
3636 gc .collect ()
3737
3838 gc .enable ()
39- print (' \n ' )
39+ print (" \n " )
4040
4141 def test_raw_3_kw_injections (self , providers ):
4242 """Test 3 keyword argument injections."""
@@ -53,7 +53,7 @@ class Test(object):
5353 def __init__ (self , a , b , c ):
5454 pass
5555
56- for x in xrange (int (5000000 * self .duration_factor )):
56+ for x in range (int (5000000 * self .duration_factor )):
5757 Test (a = A (), b = B (), c = C ())
5858
5959 def test_factory_3_factory_kw_injections (self , providers ):
@@ -78,7 +78,7 @@ def __init__(self, a, b, c):
7878 a = a_factory ,
7979 b = b_factory ,
8080 c = c_factory )
81- for x in xrange (int (5000000 * self .duration_factor )):
81+ for x in range (int (5000000 * self .duration_factor )):
8282 test_factory ()
8383
8484 def test_abstract_factory_3_factory_kw_injections (self , providers ):
@@ -104,7 +104,7 @@ def __init__(self, a, b, c):
104104 a = a_factory ,
105105 b = b_factory ,
106106 c = c_factory ))
107- for x in xrange (int (5000000 * self .duration_factor )):
107+ for x in range (int (5000000 * self .duration_factor )):
108108 test_factory ()
109109
110110 def test_factory_6_factory_kw_injections_0_context (self , providers ):
@@ -114,7 +114,7 @@ def __init__(self, a, b, c, d, e, f):
114114 pass
115115
116116 test_factory = providers .Factory (Test , a = 1 , b = 2 , c = 3 , d = 4 , e = 5 , f = 6 )
117- for x in xrange (int (5000000 * self .duration_factor )):
117+ for x in range (int (5000000 * self .duration_factor )):
118118 test_factory ()
119119
120120 def test_factory_6_factory_kw_injections_1_context (self , providers ):
@@ -124,7 +124,7 @@ def __init__(self, a, b, c, d, e, f):
124124 pass
125125
126126 test_factory = providers .Factory (Test , f = 6 )
127- for x in xrange (int (5000000 * self .duration_factor )):
127+ for x in range (int (5000000 * self .duration_factor )):
128128 test_factory (a = 1 , b = 2 , c = 3 , d = 4 , e = 5 )
129129
130130 def test_factory_6_factory_kw_injections_3_context (self , providers ):
@@ -134,11 +134,11 @@ def __init__(self, a, b, c, d, e, f):
134134 pass
135135
136136 test_factory = providers .Factory (Test , a = 1 , b = 2 , c = 3 )
137- for x in xrange (int (5000000 * self .duration_factor )):
137+ for x in range (int (5000000 * self .duration_factor )):
138138 test_factory (d = 4 , e = 5 , f = 6 )
139139
140140
141- if __name__ == ' __main__' :
141+ if __name__ == " __main__" :
142142 tester = Tester (
143143 provider_modules = [
144144 dependency_injector .providers ,
0 commit comments