@@ -44,6 +44,7 @@ def _class_per_db_dec(filter_name=None):
4444 ]
4545 return parameterized_class (("name" , "db_name" ), names )
4646
47+
4748def _table_segment (database , table_path , key_columns , * args , ** kw ):
4849 if isinstance (key_columns , str ):
4950 key_columns = (key_columns ,)
@@ -195,16 +196,24 @@ def test_basic(self):
195196 def test_offset (self ):
196197 differ = HashDiffer (bisection_factor = 2 , bisection_threshold = 10 )
197198 sec1 = self .now .shift (seconds = - 1 ).datetime
198- a = _table_segment (self .connection , self .table_src_path , "id" , "datetime" , max_update = sec1 , case_sensitive = False )
199- b = _table_segment (self .connection , self .table_dst_path , "id" , "datetime" , max_update = sec1 , case_sensitive = False )
199+ a = _table_segment (
200+ self .connection , self .table_src_path , "id" , "datetime" , max_update = sec1 , case_sensitive = False
201+ )
202+ b = _table_segment (
203+ self .connection , self .table_dst_path , "id" , "datetime" , max_update = sec1 , case_sensitive = False
204+ )
200205 assert a .count () == 4
201206 assert b .count () == 3
202207
203208 assert not list (differ .diff_tables (a , a ))
204209 self .assertEqual (len (list (differ .diff_tables (a , b ))), 1 )
205210
206- a = _table_segment (self .connection , self .table_src_path , "id" , "datetime" , min_update = sec1 , case_sensitive = False )
207- b = _table_segment (self .connection , self .table_dst_path , "id" , "datetime" , min_update = sec1 , case_sensitive = False )
211+ a = _table_segment (
212+ self .connection , self .table_src_path , "id" , "datetime" , min_update = sec1 , case_sensitive = False
213+ )
214+ b = _table_segment (
215+ self .connection , self .table_dst_path , "id" , "datetime" , min_update = sec1 , case_sensitive = False
216+ )
208217 assert a .count () == 2
209218 assert b .count () == 2
210219 assert not list (differ .diff_tables (a , b ))
0 commit comments