Skip to main content

Spark testing for python

Project description

python-spark-testing-base

Base classes to use when writing Python tests with Spark.

Original project

This is a fork of the following project to package into Pypi: https://github.com/holdenk/spark-testing-base

Why?

You’ve written an awesome program in Spark and now its time to write some tests. Only you find yourself writing the code to setup and tear down local mode Spark in between each suite and you say to your self: This is not my beautiful code.

How?

pip install spark-testing-base

From now on, you can use the following base classes in your unit tests:

SparkTestingBaseTestCase:

    Basic common test case for Spark. Provides a Spark context as sc.
    For non local mode testing you can either override sparkMaster
    or set the enviroment property SPARK_MASTER for non-local mode testing

SparkTestingBaseReuse

    Basic common test case for Spark. Provides a Spark context as sc.
    For non local mode testing you can either override sparkMaster
    or set the enviroment property SPARK_MASTER for non-local mode testing

StreamingTestCase

    Basic common test case for Spark Streaming tests. Provides a
    Spark Streaming context as well as some helper methods for creating
    streaming input and collecting streaming output.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spark-testing-base-0.0.7.post2.tar.gz (5.4 kB view details)

Uploaded Source

File details

Details for the file spark-testing-base-0.0.7.post2.tar.gz.

File metadata

File hashes

Hashes for spark-testing-base-0.0.7.post2.tar.gz
Algorithm Hash digest
SHA256 1abf121cb88017595e11701b2b2a2bc0d232a992f33402fe7e8981c10931cb9e
MD5 7a4728a8edbd4ebbde2621d8772ae68d
BLAKE2b-256 fdefa05845d4d5677131c05c8d7f1c335cffe69739bbcc1782ce540f2013685c

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page