Skip to content

Commit

Permalink
tests: remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
pfps committed Mar 27, 2024
1 parent fa6cdea commit e9ba87b
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 23 deletions.
7 changes: 0 additions & 7 deletions lib/logitech_receiver/hidpp20.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,6 @@
KIND_MAP = {kind: _hidpp10_constants.DEVICE_KIND[str(kind)] for kind in DEVICE_KIND}


def hexint_presenter(dumper, data):
return dumper.represent_int(hex(data))


_yaml.add_representer(int, hexint_presenter)


class FeaturesArray(dict):
def __init__(self, device):
assert device is not None
Expand Down
2 changes: 1 addition & 1 deletion tests/logitech_receiver/test_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def test_named_int_yaml():

yaml_string = yaml.dump(named_int)

assert yaml_string == "!NamedInt {name: two, value: 0x2}\n"
assert yaml_string == "!NamedInt {name: two, value: 2}\n"

yaml_load = yaml.safe_load(yaml_string)

Expand Down
15 changes: 0 additions & 15 deletions tests/logitech_receiver/test_hidpp20_simple.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from dataclasses import dataclass

import pytest

from logitech_receiver import common
Expand All @@ -8,19 +6,6 @@

from . import hidpp


@dataclass
class Dumper:
def represent_int(arg):
return arg


def test_hexint_presenter():
result = hidpp20.hexint_presenter(Dumper, 18)

assert result == "0x12"


_hidpp20 = hidpp20.Hidpp20()


Expand Down

0 comments on commit e9ba87b

Please sign in to comment.