Skip to content

Commit a90fe8f

Browse files
Googlertensorflower-gardener
authored andcommitted
Use assertIn instead of assertContainsSubsequence for substring checks.
A contained subsequence must not necessarily be continuous, so the check only checked if the individual letters were appearing in order within the message, possibly interspersed with other characters. PiperOrigin-RevId: 690890495
1 parent ee09c17 commit a90fe8f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tensorflow_probability/python/sts/default_model_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ def test_has_expected_seasonality(self):
6161
self.assertIsInstance(model.components[0],
6262
local_linear_trend.LocalLinearTrend)
6363
self.assertIsInstance(model.components[1], seasonal.Seasonal)
64-
self.assertContainsSubsequence(model.components[1].name, 'HOUR_OF_DAY')
64+
self.assertIn('HOUR_OF_DAY', model.components[1].name)
6565
self.assertIsInstance(model.components[2], seasonal.Seasonal)
66-
self.assertContainsSubsequence(model.components[2].name, 'DAY_OF_WEEK')
66+
self.assertIn('DAY_OF_WEEK', model.components[2].name)
6767

6868
def test_explicit_base_component(self):
6969
series = self._build_test_series(shape=[48], freq=pd.DateOffset(hours=1))

0 commit comments

Comments
 (0)