-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
315 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Contributors | ||
- [Russell Cloran] (https://github.com/rcloran) | ||
- [Alexei Chetroi] (https://github.com/Adminiuga) | ||
- [Andreas Bomholtz] (https://github.com/AndreasBomholtz) | ||
- [damarco] (https://github.com/damarco) | ||
- [Kyle Hendricks] (https://github.com/kylehendricks) | ||
- [Yoda-x] (https://github.com/Yoda-x) | ||
- [Elelabs-maintainer] (https://github.com/Elelabs-maintainer) | ||
- [Peter Marheine] (https://github.com/tari) | ||
- [Matthew Schick] (https://github.com/mattsch) | ||
- [henryptung] (https://github.com/henryptung) | ||
- [Gavin Mogan] (https://github.com/halkeye) | ||
- [h3ndrik] (https://github.com/h3ndrik) | ||
- [Hedda] (https://github.com/Hedda) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
MAJOR_VERSION = 0 | ||
MINOR_VERSION = 11 | ||
MINOR_VERSION = 12 | ||
PATCH_VERSION = "0" | ||
__short_version__ = "{}.{}".format(MAJOR_VERSION, MINOR_VERSION) | ||
__version__ = "{}.{}".format(__short_version__, PATCH_VERSION) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import bellows.zigbee.util | ||
import pytest | ||
import voluptuous as vol | ||
|
||
|
||
@pytest.mark.parametrize( | ||
"value, result", | ||
[ | ||
(False, False), | ||
(True, True), | ||
("1", True), | ||
("yes", True), | ||
("YeS", True), | ||
("on", True), | ||
("oN", True), | ||
("enable", True), | ||
("enablE", True), | ||
(0, False), | ||
("no", False), | ||
("nO", False), | ||
("off", False), | ||
("ofF", False), | ||
("disable", False), | ||
("disablE", False), | ||
], | ||
) | ||
def test_config_validation_bool(value, result): | ||
"""Test boolean config validation.""" | ||
assert bellows.zigbee.util.cv_boolean(value) is result | ||
|
||
|
||
@pytest.mark.parametrize("value", ["invalid", "not a bool", "something"]) | ||
def test_config_validation_bool_invalid(value): | ||
"""Test boolean config validation.""" | ||
with pytest.raises(vol.Invalid): | ||
bellows.zigbee.util.cv_boolean(value) |
Oops, something went wrong.