Skip to content

Commit 9787137

Browse files
committed
adding test for str() explicitly
1 parent 4812b63 commit 9787137

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pymc3/tests/test_distributions.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1774,6 +1774,14 @@ def test___str__(self):
17741774
for str_repr in self.expected_str:
17751775
assert str_repr in model_str
17761776

1777+
def test_str(self):
1778+
for distribution, str_repr in zip(self.distributions, self.expected_str):
1779+
assert str(distribution) == str_repr
1780+
1781+
model_str = str(self.model)
1782+
for str_repr in self.expected_str:
1783+
assert str_repr in model_str
1784+
17771785

17781786
def test_discrete_trafo():
17791787
with pytest.raises(ValueError) as err:

0 commit comments

Comments
 (0)