tests: remove unused code
This commit is contained in:
parent
12f3f2e856
commit
c70e8b54bf
|
@ -52,13 +52,6 @@ logger = logging.getLogger(__name__)
|
||||||
KIND_MAP = {kind: _hidpp10_constants.DEVICE_KIND[str(kind)] for kind in DEVICE_KIND}
|
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):
|
class FeaturesArray(dict):
|
||||||
def __init__(self, device):
|
def __init__(self, device):
|
||||||
assert device is not None
|
assert device is not None
|
||||||
|
|
|
@ -56,7 +56,7 @@ def test_named_int_yaml():
|
||||||
|
|
||||||
yaml_string = yaml.dump(named_int)
|
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)
|
yaml_load = yaml.safe_load(yaml_string)
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
from dataclasses import dataclass
|
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from logitech_receiver import common
|
from logitech_receiver import common
|
||||||
|
@ -8,19 +6,6 @@ from logitech_receiver import hidpp20_constants
|
||||||
|
|
||||||
from . import hidpp
|
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()
|
_hidpp20 = hidpp20.Hidpp20()
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue