Another attempt at SparkContext creation in tests.
SparkEnvironment then looks like this
- a myIt that users call instead of it. myIt ends up calling it
- a setup/tearDown that actually creates and frees the mutable context variable
The second point is why I don't like this too much as users need to call this
in every suite that uses SparkContext
minor change: organize imports
Another attempt at SparkContext creation in tests.
This one uses fixture.FunSpec.withFixture to pass in the SparkContext
to the tests.
Pros
- Remove SparkEnvironment
Cons
- Had to add a separate TestEnvironmentFixture that is the same as
TestEnvironment except for withFixture.
Refactored TestEnvironment to reduce code duplication
Cleanup TestEnvironment
minor change: add comments to TestEnvironment