Skip to content

Commit

Permalink
Bug fix, reset defaulted to true instead of false
Browse files Browse the repository at this point in the history
  • Loading branch information
washad committed Jul 3, 2019
1 parent e10b95a commit ef31108
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyrediseasyio/html/html_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down
1 change: 1 addition & 0 deletions tests/test_get_attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion tests/test_html_io_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def test_set_reset_true(self):
<button class="easyio_set" onclick="EasyIOSet('Pin1','Bool1','Pin1Bool1',true)">SetMe</button>
</td>
<td class="easyio_btn_cell easyio_rst_btn_cell">
<button class="easyio_reset" onclick="EasyIOSet('Pin1','Bool1','Pin1Bool1',true)">Reset</button>
<button class="easyio_reset" onclick="EasyIOSet('Pin1','Bool1','Pin1Bool1',false)">Reset</button>
</td>
</tr>
<tr class="easyio_io" data-type="FloatIO" id="Pin1Float1_io">
Expand Down

0 comments on commit ef31108

Please sign in to comment.