chhenning / nupic

Community Fork of Numenta's Platform for Intelligent Computing (NuPIC)
GNU Affero General Public License v3.0
6 stars 2 forks source link

sdr_classifier_test #6

Closed chhenning closed 6 years ago

chhenning commented 6 years ago
\python3\tests\unit\nupic\algorithms>python sdr_classifier_test.py
...F....................ss.
======================================================================
FAIL: testComputeCategory (__main__.SDRClassifierTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "sdr_classifier_test.py", line 249, in testComputeCategory
    self.assertIsInstance(value, (type(None), bytes))
AssertionError: 'D' is not an instance of (<class 'NoneType'>, <class 'bytes'>)
chhenning commented 6 years ago

see: https://discourse.numenta.org/t/python-3-migration-sdr-classifier-test/3456

chhenning commented 6 years ago

'D' is an instance of 'str'. 2to3 script issue. It should be self.assertIsInstance(value, (type(None), str)) and not self.assertIsInstance(value, (type(None), bytes))