We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b59f646 commit 3c4d421Copy full SHA for 3c4d421
bindings/py/tests/algorithms/spatial_pooler_test.py
@@ -177,6 +177,19 @@ def testNupicSpatialPoolerPickling(self):
177
self.assertEqual(sp.getNumColumns(), sp2.getNumColumns(),
178
"Simple NuPIC SpatialPooler pickle/unpickle failed.")
179
180
+ def testNupicSpatialPoolerSavingToString(self):
181
+ """Test writing to and reading from NuPIC SpatialPooler."""
182
+
183
+ # Simple test: make sure that writing/reading works...
184
+ sp = SP()
185
+ s = sp.writeToString()
186
187
+ sp2 = sp.readFromString(s)
188
189
+ self.assertEqual(sp.getNumColumns(), sp2.getNumColumns(),
190
+ "NuPIC SpatialPooler write to/read from string failed.")
191
192
193
194
if __name__ == "__main__":
195
unittest.main()
0 commit comments