Skip to content

Commit

Permalink
add testing of seed stability
Browse files Browse the repository at this point in the history
  • Loading branch information
dougbrn committed Jul 1, 2024
1 parent cb844e6 commit de80e9e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/nested_dask/test_datasets.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import nested_dask as nd
import pytest


def test_generate_data():
Expand All @@ -18,3 +19,8 @@ def test_generate_data():
# test the length
assert len(generate_1) == 10
assert len(generate_1.nested.nest.to_flat()) == 1000

# test seed stability
assert pytest.approx(generate_1.compute().loc[0]["a"], 0.1) == 0.417
assert pytest.approx(generate_1.compute().loc[0]["b"], 0.1) == 0.838
assert pytest.approx(generate_1.nested.nest.to_flat().compute().iloc[0]["t"], 0.1) == 16.015

0 comments on commit de80e9e

Please sign in to comment.