Nose2 plugin to run the tests with support of pyspark.
Project description
Nose2 plugin to run the tests with support of pyspark (Apache Spark).
Features:
Make “pyspark” importable in you code executed by nose2.
Add a list of py-files dependencies of your pyspark application.
Install
$ pip install nose2-spark
Usage
Load “nose2-spark” plugin into nose2 by creating nose2.cfg in your project directory:
[unittest] plugins = nose2_spark
Run tests with nose2-spark activated (pyspark and friends are added to pythonpath):
$ nose2 --pyspark
nose2-spark will try to import pyspark by looking into:
SPARK_HOME environment variable
Some common Spark locations.
You can set it manually in case if all of mentioned methods are failing to find Spark. Add section “nose2-spark” to nose2.cfg:
[nose2-spark] spark_home = /opt/spark
You can add a list of required py-files to run your code:
[nose2-spark] pyfiles = package1.zip package2.zip
Example
Example of nose2.cfg with spark_home defined, one py-files dependency and auto activating nose2-spark plugin:
[unittest] plugins = nose2_spark [nose2-spark] always-on = True spark_home = /opt/spark pyfiles = package1.zip
This will allow to run tests by single command:
$ nose2
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for nose2_spark-0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0569db97a38249343314680102603cc0ae88d37110dc9e82c2524201f368583a |
|
MD5 | a22f73d5b9a9a6f7e295bd8314d5a94f |
|
BLAKE2b-256 | c316d6b2edebaa563718ebf23760e2f32f78f1173d880a2dc674216725f2c27e |