File tree Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 23
23
24
24
**Fixes **
25
25
26
+ - Tree sequences were not properly init'd after unpickling
27
+ (:user: `benjeffery `, :issue: `1297 `, :pr: `1298 `)
28
+
26
29
--------------------
27
30
[0.3.5] - 2021-03-16
28
31
--------------------
Original file line number Diff line number Diff line change @@ -1807,7 +1807,11 @@ def test_table_metadata_round_trip_via_row_getters(self):
1807
1807
1808
1808
1809
1809
def test_pickle_round_trip (ts_fixture ):
1810
- assert ts_fixture .tables == pickle .loads (pickle .dumps (ts_fixture )).tables
1810
+ for protocol in range (pickle .HIGHEST_PROTOCOL + 1 ):
1811
+ ts = pickle .loads (pickle .dumps (ts_fixture , protocol = protocol ))
1812
+ assert ts .tables == ts_fixture .tables
1813
+ # Do some thing to check the ts is init'd properly
1814
+ ts .draw_text ()
1811
1815
1812
1816
1813
1817
class TestFileUuid (HighLevelTestCase ):
Original file line number Diff line number Diff line change @@ -3315,7 +3315,7 @@ def __getstate__(self):
3315
3315
return self .dump_tables ()
3316
3316
3317
3317
def __setstate__ (self , tc ):
3318
- self ._ll_tree_sequence = tc .tree_sequence ().ll_tree_sequence
3318
+ self .__init__ ( tc .tree_sequence ().ll_tree_sequence )
3319
3319
3320
3320
def __eq__ (self , other ):
3321
3321
return self .tables == other .tables
You can’t perform that action at this time.
0 commit comments