File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -193,7 +193,8 @@ def begin(self) -> None:
193
193
"""
194
194
if self .run_time <= 0 :
195
195
raise ValueError (
196
- f"{ self } has a runtime of <= 0 seconds, which cannot be rendered correctly! please set a runtime > 0"
196
+ f"{ self } has a run_time of <= 0 seconds, this cannot be rendered correctly. "
197
+ "Please set the run_time to be positive"
197
198
)
198
199
self .starting_mobject = self .create_starting_mobject ()
199
200
if self .suspend_mobject_updating :
Original file line number Diff line number Diff line change @@ -86,12 +86,13 @@ def get_all_mobjects(self) -> Sequence[Mobject]:
86
86
def begin (self ) -> None :
87
87
if self .run_time <= 0 :
88
88
tmp = (
89
- "please set a runtime > 0 "
89
+ "Please set the run_time to be positive "
90
90
if len (self .animations ) != 0
91
- else "Please add at least one Animation"
91
+ else "Please add at least one Animation with positive run_time "
92
92
)
93
93
raise ValueError (
94
- f"{ self } has a runtime of 0 seconds. Which cannot be rendered correctly! { tmp } ."
94
+ f"{ self } has a run_time of 0 seconds, this cannot be "
95
+ f"rendered correctly. { tmp } ."
95
96
)
96
97
if self .suspend_mobject_updating :
97
98
self .group .suspend_updating ()
Original file line number Diff line number Diff line change @@ -172,10 +172,10 @@ def test_animationgroup_is_passing_remover_to_nested_animationgroups():
172
172
173
173
174
174
def test_empty_animation_group_fails ():
175
- with pytest .raises (ValueError ):
175
+ with pytest .raises (ValueError , match = "Please add at least one Animation" ):
176
176
AnimationGroup ().begin ()
177
177
178
178
179
179
def test_empty_animation_fails ():
180
- with pytest .raises (ValueError ):
180
+ with pytest .raises (ValueError , match = "Please set the run_time to be positive" ):
181
181
FadeIn (None , run_time = 0 ).begin ()
You can’t perform that action at this time.
0 commit comments