Skip to content

Commit 68fbd48

Browse files
author
Paul Prescod
committed
Rename some files
1 parent f3f639a commit 68fbd48

7 files changed

Lines changed: 10 additions & 6 deletions

File tree

docs/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1870,7 +1870,7 @@ it will generate an appropriate number of children with
18701870
values that sum up to match it, using `Math.random_partition`:
18711871

18721872
```yaml
1873-
# examples/math_partition_simple.recipe.yml
1873+
# examples/math_partition/math_partition_simple.recipe.yml
18741874
- plugin: snowfakery.standard_plugins.Math
18751875
- object: ParentObject__c
18761876
count: 2
@@ -1919,7 +1919,7 @@ values of `4`, `8`, `12` are valid.
19191919
For example:
19201920

19211921
```yaml
1922-
# examples/sum_simple_example.yml
1922+
# examples/math_partition/sum_simple_example.recipe.yml
19231923
- plugin: snowfakery.standard_plugins.Math
19241924
19251925
- object: Values
@@ -1943,7 +1943,7 @@ granularity), `0.05` (nickle), `0.10` (dime), `0.25` (quarter) and
19431943
`0.50` (half dollars). Other values are not supported.
19441944

19451945
```yaml
1946-
# examples/sum_pennies.yml
1946+
# examples/math_partition/sum_pennies.recipe.yml
19471947
- plugin: snowfakery.standard_plugins.Math
19481948
19491949
- object: Values
File renamed without changes.

examples/sum_pennies.yml renamed to examples/math_partition/sum_pennies.recipe.yml

File renamed without changes.

examples/sum_pennies_param.yml renamed to examples/math_partition/sum_pennies_param.recipe.yml

File renamed without changes.

examples/sum_simple_example.yml renamed to examples/math_partition/sum_simple_example.recipe.yml

File renamed without changes.
File renamed without changes.
Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,17 @@
1010
@pytest.mark.parametrize("seed", [randint(0, 2 ** 32) for r in range(REPS)])
1111
class TestSummation:
1212
def test_example(self, generated_rows, seed):
13-
generate_data("examples/math_partition_simple.recipe.yml", seed=seed)
13+
generate_data(
14+
"examples/math_partition/math_partition_simple.recipe.yml", seed=seed
15+
)
1416
parents = generated_rows.table_values("ParentObject__c")
1517
children = generated_rows.table_values("ChildObject__c")
1618
assert sum(p["TotalAmount__c"] for p in parents) == sum(
1719
c["Amount__c"] for c in children
1820
), (parents, children)
1921

2022
def test_example_pennies(self, generated_rows, seed):
21-
generate_data("examples/sum_pennies.yml", seed=seed)
23+
generate_data("examples/math_partition/sum_pennies.recipe.yml", seed=seed)
2224
objs = generated_rows.table_values("Values")
2325
assert round(sum(p["Amount"] for p in objs)) == 100, sum(
2426
p["Amount"] for p in objs
@@ -27,7 +29,9 @@ def test_example_pennies(self, generated_rows, seed):
2729
@pytest.mark.parametrize("step", [0.01, 0.5, 0.1, 0.20, 0.25, 0.50])
2830
def test_example_pennies_param(self, generated_rows, seed, step: int):
2931
generate_data(
30-
"examples/sum_pennies_param.yml", user_options={"step": step}, seed=1
32+
"examples/math_partition/sum_pennies_param.recipe.yml",
33+
user_options={"step": step},
34+
seed=1,
3135
)
3236
objs = generated_rows.table_values("Values")
3337
assert round(sum(p["Amount"] for p in objs)) == 100, sum(

0 commit comments

Comments
 (0)