Skip to content

Commit

Permalink
Tests for GameUI.fps
Browse files Browse the repository at this point in the history
  • Loading branch information
mgedmin committed May 2, 2019
1 parent f2c5b3c commit 6ad95ee
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/pyspacewar/tests/test_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,26 @@ def doctest_FrameRateCounter_fps():
"""


def doctest_FrameRateCounter_fps_no_division_by_zero():
"""Tests for FrameRateCounter.fps
>>> from pyspacewar.ui import FrameRateCounter
>>> frc = FrameRateCounter()
>>> frc.frames = []
>>> frc.fps()
0
>>> frc.frames = [1000]
>>> frc.fps()
0
>>> frc.frames += [1000]
>>> frc.fps()
0
"""


def doctest_FrameRateCounter_notional_fps():
"""Tests for FrameRateCounter.notional_fps
Expand Down

0 comments on commit 6ad95ee

Please sign in to comment.