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 (which is usually supplied as an option spark-submit --py-files ...).
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
File details
Details for the file nose2-spark-0.2.tar.gz
.
File metadata
- Download URL: nose2-spark-0.2.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53fb6a6aee5e09c7bd42a15f1742764642f3b4174033d84d0230f58aa5111844 |
|
MD5 | 7226487ed70e31674568b9dad35cd0ff |
|
BLAKE2b-256 | d1642c9e0a6d86d2f3fcbf598e3915199279874fc975d9f57fc138d0643bfb59 |
File details
Details for the file nose2_spark-0.2-py2.py3-none-any.whl
.
File metadata
- Download URL: nose2_spark-0.2-py2.py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9661848c9d4e3137bc527b07fc7ea1b5ca5765ddca78f18fc4a4b0c313a7c9ed |
|
MD5 | f75741d3788c3085d158dd3a7a204e58 |
|
BLAKE2b-256 | 10c3b2ff15307859002fb4a970b645fd7e68986b70727119e935c159543aaa4b |