diff --git a/test/testwwvb.py b/test/testwwvb.py index e171bff..f66c67c 100755 --- a/test/testwwvb.py +++ b/test/testwwvb.py @@ -14,7 +14,6 @@ import io import pathlib import random import sys -import typing import unittest import uwwvb @@ -48,13 +47,12 @@ class WWVBTestCase(unittest.TestCase): channel: WWVBChannel = "amplitude" style = "default" for o in options: - if o.startswith("--channel="): - value = o[10:] - if value in {"both", "amplitude", "phase"}: - # pyrefly: ignore # redundant-cast - channel = typing.cast("WWVBChannel", value) - else: - raise ValueError(f"Unknown channel {o!r}") + if o == "--channel=both": + channel = "both" + elif o == "--channel=amplitude": + channel = "amplitude" + elif o == "--channel=phase": + channel = "phase" elif o.startswith("--style="): style = o[8:] else: