Skip to content

Commit

Permalink
notes on how to fix the next round of tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tantaman committed Oct 26, 2023
1 parent 0fc343d commit a27d032
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion py/correctness/tests/test_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,8 @@ def test_delete():
close(db)


# Row not exists case so entry created and default filled in
# TODO: create db _then swap_ then create rows then check original invariants
# Col? not exists case so entry created and default filled in
def test_merging_on_defaults():
def create_db1():
db1 = connect(":memory:")
Expand All @@ -176,6 +177,10 @@ def create_db2():
# test merging from thing with records (db2) to thing without records for default cols (db1)
db1 = create_db1()
db2 = create_db2()
if get_site_id(db1) > get_site_id(db2):
temp = db1
db1 = db2
db2 = temp

sync_left_to_right(db2, db1, 0)
# db1 has changes from db2
Expand All @@ -190,6 +195,10 @@ def create_db2():

db1 = create_db1()
db2 = create_db2()
if get_site_id(db1) > get_site_id(db2):
temp = db1
db1 = db2
db2 = temp

sync_left_to_right(db1, db2, 0)

Expand Down

0 comments on commit a27d032

Please sign in to comment.