It's great that you are putting in tests! Please put the tests in `nupic/tests/unit/py2/nupic/encoders`. You'll need to write the test in unit test format similar to the other tests there. These tests will then get run with every checkin. (I know the other encoders have their tests the way you have written it, but that has to change too. :)