chore(lib): simplify how to add config options (#321)

* chore(lib): simplify how to add config options

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* chore(lint): some fixes

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Jérome Eertmans
2023-11-23 15:38:49 +01:00
committed by GitHub
parent eb8efa8e3d
commit b09a000c17
7 changed files with 111 additions and 57 deletions

View File

@ -140,16 +140,16 @@ class TestSlide:
self.add(text)
assert "loop" not in self._pre_slide_config_kwargs
assert not self._base_slide_config.loop
self.next_slide(loop=True)
self.play(text.animate.scale(2))
assert self._pre_slide_config_kwargs["loop"]
assert self._base_slide_config.loop
self.next_slide(loop=False)
assert not self._pre_slide_config_kwargs["loop"]
assert not self._base_slide_config.loop
@assert_constructs
class TestAutoNext(Slide):
@ -158,16 +158,16 @@ class TestSlide:
self.add(text)
assert "auto_next" not in self._pre_slide_config_kwargs
assert not self._base_slide_config.auto_next
self.next_slide(auto_next=True)
self.play(text.animate.scale(2))
assert self._pre_slide_config_kwargs["auto_next"]
assert self._base_slide_config.auto_next
self.next_slide(auto_next=False)
assert not self._pre_slide_config_kwargs["auto_next"]
assert not self._base_slide_config.auto_next
@assert_constructs
class TestLoopAndAutoNextFails(Slide):
@ -189,12 +189,12 @@ class TestSlide:
self.add(text)
assert "playback_rate" not in self._pre_slide_config_kwargs
assert self._base_slide_config.playback_rate == 1.0
self.next_slide(playback_rate=2.0)
self.play(text.animate.scale(2))
assert self._pre_slide_config_kwargs["playback_rate"] == 2.0
assert self._base_slide_config.playback_rate == 2.0
@assert_constructs
class TestWipe(Slide):