Add unit test for str product sample spaces.
Fix 2to3ism.