Skip to content

Commit

Permalink
Merge branch 'master' of github.com:machielg/sparkle-test
Browse files Browse the repository at this point in the history
  • Loading branch information
machielg committed Nov 4, 2019
2 parents 9d32103 + 0c67521 commit 14f28f6
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,30 @@
Behave BDD and Unit testing utilities for easy and fast tests in pyspark

The base unit test class creates an in memory derby DB and any warehouse files
are written to a unique directory to avoid clashes between tests
are written to a unique directory to avoid clashes between tests

# Installation
```
pip install sparkle-test
```

# Usage
Simply subclass the SparkleTestCase

```python
from sparkle_test import SparkleTestCase

class SparkleTestCaseTest(SparkleTestCase):

def test_something(self):
print(self.spark.version)
```

You can optionally set specific settings for custom jars, packages and repositories:
```python
class SparkleTestCaseTest(SparkleTestCase):
jars = ['src/unittest/resources/foo.jar']
packages = ['com.databricks:spark-csv_2.10:1.4.0']
repositories = ['http://nexus.foo.com']
options = {'spark.foo': 'bar'}
```

0 comments on commit 14f28f6

Please sign in to comment.