Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,11 @@ build-backend = "setuptools.build_meta"
packages = ["monitorcontrol"]

[tool.ruff.lint]
# Add flake8-bugbear and pep8-naming rules
extend-select = ["B", "N"]
extend-select = [
# flake8-unused-arguments
"ARG",
# flake8-bugbear
"B",
# pep8-naming
"N",
]
39 changes: 19 additions & 20 deletions tests/test_monitorcontrol.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,32 +173,31 @@ def test_power_mode(
USE_ATTACHED_MONITORS, reason="Real monitors dont support all input types"
)
@pytest.mark.parametrize(
"mode, expected",
"mode",
[
(InputSource.ANALOG1, 0x01),
(InputSource.ANALOG2, 0x02),
(InputSource.DVI1, 0x03),
(InputSource.DVI2, 0x04),
(InputSource.COMPOSITE1, 0x05),
(InputSource.COMPOSITE2, 0x06),
(InputSource.SVIDEO1, 0x07),
(InputSource.SVIDEO2, 0x08),
(InputSource.TUNER1, 0x09),
(InputSource.TUNER2, 0x0A),
(InputSource.TUNER3, 0x0B),
(InputSource.CMPONENT1, 0x0C),
(InputSource.CMPONENT2, 0x0D),
(InputSource.CMPONENT3, 0x0E),
(InputSource.DP1, 0x0F),
(InputSource.DP2, 0x10),
(InputSource.HDMI1, 0x11),
(InputSource.HDMI2, 0x12),
InputSource.ANALOG1,
InputSource.ANALOG2,
InputSource.DVI1,
InputSource.DVI2,
InputSource.COMPOSITE1,
InputSource.COMPOSITE2,
InputSource.SVIDEO1,
InputSource.SVIDEO2,
InputSource.TUNER1,
InputSource.TUNER2,
InputSource.TUNER3,
InputSource.CMPONENT1,
InputSource.CMPONENT2,
InputSource.CMPONENT3,
InputSource.DP1,
InputSource.DP2,
InputSource.HDMI1,
InputSource.HDMI2,
],
)
def test_input_source(
monitor: Monitor,
mode: Union[str, int],
expected: Tuple[InputSource, int],
):
monitor.set_input_source(mode)
read_source = monitor.get_input_source()
Expand Down