Browse code

test for more points

Bas Nijholt authored on 14/04/2020 11:49:27
Showing 1 changed files
... ...
@@ -87,7 +87,8 @@ def test_serialization_for(learner_type, learner_kwargs, serializer):
87 87
     simple(learner, goal_1)
88 88
     learner_bytes = serializer.dumps(learner)
89 89
     loss = learner.loss()
90
-    asked = learner.ask(1)
90
+    asked = learner.ask(10)
91
+    data = learner.data
91 92
 
92 93
     if serializer is not pickle:
93 94
         # With pickle the functions are only pickled by reference
... ...
@@ -97,8 +98,10 @@ def test_serialization_for(learner_type, learner_kwargs, serializer):
97 98
     learner_loaded = serializer.loads(learner_bytes)
98 99
     assert learner_loaded.npoints == 10
99 100
     assert loss == learner_loaded.loss()
101
+    assert data == learner_loaded.data
102
+
103
+    assert asked == learner_loaded.ask(10)
100 104
 
101
-    assert asked == learner_loaded.ask(1)
102 105
     # load again to undo the ask
103 106
     learner_loaded = serializer.loads(learner_bytes)
104 107