def test_expand_cronspec_eats_iterables(self): self.assertEqual( crontab._expand_cronspec(iter([1, 2, 3]), 100), {1, 2, 3}, ) self.assertEqual( crontab._expand_cronspec(iter([1, 2, 3]), 100, 1), {1, 2, 3}, )
def test_expand_cronspec_invalid_type(self): with self.assertRaises(TypeError): crontab._expand_cronspec(object(), 100)
def test_expand_cronspec_invalid_type(self): with pytest.raises(TypeError): crontab._expand_cronspec(object(), 100)
def test_expand_cronspec_eats_iterables(self): assert crontab._expand_cronspec(iter([1, 2, 3]), 100) == {1, 2, 3} assert crontab._expand_cronspec(iter([1, 2, 3]), 100, 1) == {1, 2, 3}