Fix PySpark unit tests on Python 2.6.
Merge pull request #829 from JoshRosen/pyspark-unit-tests-python-2.6

Fix PySpark unit tests on Python 2.6