Skip to content

Commit e3ee9e9

Browse files
committed
Format tests
1 parent 9e984eb commit e3ee9e9

File tree

3 files changed

+5
-15
lines changed

3 files changed

+5
-15
lines changed

tests/test_distributions.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -490,15 +490,11 @@ def test_exponential_generation_func(self):
490490
def test_exponential_requires_rate_for_scale(self):
491491
"""Ensure accessing scale without a rate produces a clear error."""
492492
exp = dist.Exponential()
493-
with pytest.raises(
494-
ValueError, match="Cannot compute value for 'scale'; Missing value for 'rate'"
495-
):
493+
with pytest.raises(ValueError, match="Cannot compute value for 'scale'; Missing value for 'rate'"):
496494
_ = exp.scale
497495

498496
def test_exponential_requires_rate_for_generation(self):
499497
"""Ensure generating samples without a rate produces a clear error."""
500498
exp = dist.Exponential()
501-
with pytest.raises(
502-
ValueError, match="Cannot compute value for 'scale'; Missing value for 'rate'"
503-
):
499+
with pytest.raises(ValueError, match="Cannot compute value for 'scale'; Missing value for 'rate'"):
504500
_ = exp.generateNormalizedDistributionSample()

tests/test_generation_from_data.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,7 @@ def test_df_containing_summary(self):
122122

123123
def test_data_analyzer_requires_dataframe(self):
124124
"""Validate that DataAnalyzer cannot be initialized without a DataFrame."""
125-
with pytest.raises(
126-
ValueError, match="Argument `df` must be supplied when initializing a `DataAnalyzer`"
127-
):
125+
with pytest.raises(ValueError, match="Argument `df` must be supplied when initializing a `DataAnalyzer`"):
128126
dg.DataAnalyzer()
129127

130128
def test_add_measure_to_summary_requires_dataframe(self):

tests/test_quick_tests.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -487,17 +487,13 @@ def test_nrange_maxvalue_and_until_conflict(self):
487487
def test_nrange_discrete_range_requires_min_max_step(self):
488488
"""Ensure getDiscreteRange validates required attributes."""
489489
rng = NRange(minValue=0.0, maxValue=10.0)
490-
with pytest.raises(
491-
ValueError, match="Range must have 'minValue', 'maxValue', and 'step' defined\\."
492-
):
490+
with pytest.raises(ValueError, match="Range must have 'minValue', 'maxValue', and 'step' defined\\."):
493491
_ = rng.getDiscreteRange()
494492

495493
def test_nrange_discrete_range_step_must_be_non_zero(self):
496494
"""Ensure getDiscreteRange validates non-zero step."""
497495
rng = NRange(minValue=0.0, maxValue=10.0, step=0)
498-
with pytest.raises(
499-
ValueError, match="Parameter 'step' must be non-zero when computing discrete range\\."
500-
):
496+
with pytest.raises(ValueError, match="Parameter 'step' must be non-zero when computing discrete range\\."):
501497
_ = rng.getDiscreteRange()
502498

503499
def test_reversed_ranges(self):

0 commit comments

Comments
 (0)