Skip to content

Commit

Permalink
🐞 Bug fixes, add additional unit tests for codes
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaneSutro committed Feb 10, 2021
1 parent 7cafec6 commit 790f9fe
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
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="Vestaboard",
version="0.2.0",
version="0.3.1",
author="Shane Sutro",
author_email="shane@shanesutro.com",
description="A Vestaboard Wrapper",
Expand Down
3 changes: 3 additions & 0 deletions tests/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ def test_raw_input_fails_if_nested_lists_not_contain_all_numbers():
def test_valid_standard_input_does_not_fail():
create_fake_cred_file()
vestaboard.Board().post('abcdefghijklmnopqrstuvwxyz1234567890 !@#$()-+&=;:"%,./?°')
vestaboard.Board().post('Triage Status:\n\n{63}Red - 24 files')
vestaboard.Board().post('Character code at end {23}')
vestaboard.Board().post('{64} Character code at beginning')
remove_fake_cred_file()

def test_invalid_standard_input_fails():
Expand Down
2 changes: 1 addition & 1 deletion vestaboard/formatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def _raw(charList):
@staticmethod
def _isValid(inputString):
inputString = inputString.lower()
test = "^[A-Za-z0-9!@#$\(\)\-+&=;:'\"%,./?° ]*(?:\{[0-9]+\})*[A-Za-z0-9!@#$\(\)\-+&=;:'\"%,./?° ]*$"
test = "^[A-Za-z0-9!@#$\(\)\-+&=;:'\"%,./?°\s ]*(?:\{[0-9]+\})*[A-Za-z0-9!@#$\(\)\-+&=;:'\"%,./?°\s ]*$"

return bool(re.match(test, inputString))

Expand Down

0 comments on commit 790f9fe

Please sign in to comment.