From ef31108bee638365f356122efd10ce1dc09409ea Mon Sep 17 00:00:00 2001 From: "core.autocrlf" Date: Wed, 3 Jul 2019 15:59:17 -0600 Subject: [PATCH] Bug fix, reset defaulted to true instead of false --- pyrediseasyio/html/html_io.py | 2 +- setup.py | 2 +- tests/test_get_attributes.py | 1 + tests/test_html_io_group.py | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pyrediseasyio/html/html_io.py b/pyrediseasyio/html/html_io.py index 5ef30e0..cba8c03 100644 --- a/pyrediseasyio/html/html_io.py +++ b/pyrediseasyio/html/html_io.py @@ -22,7 +22,7 @@ def __init__(self, io: SingleIO): self.units = io.units self.namespace = io.namespace self.default_set_value = True if isinstance(io, BooleanIO) or isinstance(io, TriggerIO) else io.default - self.default_reset_value = True if isinstance(io, BooleanIO) or isinstance(io, TriggerIO) else 0 + self.default_reset_value = False if isinstance(io, BooleanIO) or isinstance(io, TriggerIO) else 0 def build(self, row_tag: dominate.tags, cell_tag: dominate.tags, **kwargs): """ diff --git a/setup.py b/setup.py index 935c052..4111d8f 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name="pyrediseasyio", - version="0.0.27", + version="0.0.28", author="Steve Jackson", author_email="washad@gmail.com", description="A set of tools for simplifying reading and writing of single values to/from Redis.", diff --git a/tests/test_get_attributes.py b/tests/test_get_attributes.py index 5080fc6..6bee087 100644 --- a/tests/test_get_attributes.py +++ b/tests/test_get_attributes.py @@ -43,6 +43,7 @@ def test_limit_attributes_by_type(self): assert_that(len(attrs)).is_equal_to(3) def test_limit_by_io_filter(self): + test_group.Float1 = 1.2 attrs = test_group.get_attributes(by_lambda_each=lambda x: x.value == 1.2) assert_that(len(attrs)).is_equal_to(1) diff --git a/tests/test_html_io_group.py b/tests/test_html_io_group.py index ca0f0db..2fdb6f5 100644 --- a/tests/test_html_io_group.py +++ b/tests/test_html_io_group.py @@ -94,7 +94,7 @@ def test_set_reset_true(self): - +