Skip to main content

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:

  1. Make “pyspark” importable in you code executed by nose2.

  2. 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:

  1. SPARK_HOME environment variable

  2. 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


Download files

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

Source Distribution

nose2-spark-0.3.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

nose2_spark-0.3-py2.py3-none-any.whl (4.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file nose2-spark-0.3.tar.gz.

File metadata

  • Download URL: nose2-spark-0.3.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for nose2-spark-0.3.tar.gz
Algorithm Hash digest
SHA256 443d341664c623de629e4f9eb444404740f71ab16a2f742b3b54429e048e6bb7
MD5 eb9a97addb704c6b56ffda75cbf635c6
BLAKE2b-256 b1db47d691433d4f0293904fdb1edb5fd759f89ef0018d0426f01cc7274e30cc

See more details on using hashes here.

File details

Details for the file nose2_spark-0.3-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for nose2_spark-0.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 17172396291eb7fa27235cfc2c6d7b7c6dbe5a11bda3987faf446bf0854c1620
MD5 d68e0ae73d07f6318403b84d01381b0a
BLAKE2b-256 77c003ffaa0bd3cf7c1f93d5a952794a7723eb2068c3cea1b8d38d0be74e2113

See more details on using hashes here.

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