def test_simple_read_rdd(self):
        """Read dataset into spark rdd. Collects and makes sure they all return as expected"""
        spark = self._get_spark_session()
        rows = dataset_as_rdd(self._dataset_url, spark).collect()

        for row in rows:
            actual = dict(row._asdict())
            expected = next(d for d in self._dataset_dicts if d['id'] == actual['id'])
            np.testing.assert_equal(expected, actual)

        spark.stop()
Read dataset into spark rdd. Collects and makes sure they all return as expected
petastorm/tests/test_spark_utils.py