Skip to main content

sparkle-hypothesis

Hypothesis for Spark Unit tests

Library for easily creating PySpark tests using Hypothesis. Create heterogenious test data with ease

Installation:

pip install sparkle-hypothesis

Example

from sparkle_hypothesis import SparkleHypothesisTestCase, save_dfs

class MyTestCase(SparkleHypothesisTestCase):
    st_groups = st.sampled_from(['Pro', 'Consumer'])

    st_customers = st.fixed_dictionaries(
        {'customer_id:long': st.integers(min_value=1, max_value=10),
        'customer_group:str': st.shared(st_groups, 'group')})

    st_groups = st.fixed_dictionaries(
        {'group_id:long': st.just(1),
         'group_name:str': st.shared(st_groups, 'group')
         })

    @given(st_customers, st_groups)
    @save_dfs()
    def test_answer_parsing(self, customers: dict, groups:dict):
        customers_df = self.spark.table('customers')
        groups_df = self.spark.table('groups')

Metadata

Release files for sparkle-hypothesis 1.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sparkle-hypothesis 1.4.0
File Size Uploaded Provenance Actions
sparkle-hypothesis-1.4.0.tar.gz 16.2 kB Without provenance Details for sparkle-hypothesis-1.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sparkle-hypothesis 1.4.0
File Interpreter ABI Platform Actions
sparkle_hypothesis-1.4.0-py3-none-any.whl Python 3 none any Details for sparkle_hypothesis-1.4.0-py3-none-any.whl

Total release size: 33.3 kB

Release files / sparkle-hypothesis-1.4.0.tar.gz

Download URL sparkle-hypothesis-1.4.0.tar.gz
Size 16.2 kB
Tags Source
SHA-256 checksum
How to use checksums
eb8349df9f67c7546f4a525130cefa096d1e72fb33e3e0870e4e3579ddbe8986
BLAKE2b-256 checksum
How to use checksums
04f2b672622367a2e5e48733d4501cde3916a3a42b752b281a88a1109773e6a3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.10.2 Darwin/21.4.0

Release files / sparkle_hypothesis-1.4.0-py3-none-any.whl

Download URL sparkle_hypothesis-1.4.0-py3-none-any.whl
Size 17.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3361fe1a5dcd79f23af48d205da6b32bf5a76402a46fffca87f29ec2ae7ea3c4
BLAKE2b-256 checksum
How to use checksums
2cd2c494902513c94777753c1fd1b47a0600e6729b9a5bbd0c4b5ceb10df7714
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.10.2 Darwin/21.4.0

Security for sparkle-hypothesis 1.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page