Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(wildcard): Updated Wildcard Tests to include V0 #7

Merged
merged 2 commits into from
Jun 20, 2019

Conversation

BradenM
Copy link
Contributor

@BradenM BradenM commented Jun 20, 2019

Commit 4bd673b causes read/write wildcard tests to fail, as it allows a nonexistent virtual pin 33 to be passed to a wildcard decorator.

This fixes the two wildcard tests that were failing. All passed on this branch.

Commit 4bd673b causes read/write wildcard tests to fail, as it allows a nonexistant virtual pin 33 t
o be passed to a wildcard decorator.
@antohaUa
Copy link
Collaborator

Hi BradenM! Range function takes right limit as N+1 value.
Please check such code:
for i in range(10):
print(i)

This will give you 0-9 digits.
So for me all looks correct - we can handle VPins 0-32 as expected

Mistake on my part, not sure what I was thinking there.
@BradenM
Copy link
Contributor Author

BradenM commented Jun 20, 2019

@antohaUa

Haha your right, my mistake. Had read the failed test logs as if 33 pins were being passed rather than 33 events.
Thanks for catching me on that one though, just wasn't thinking.

Anyways, I reverted my original change and updated the tests properly. Now they pass and should pass!

@BradenM BradenM changed the title fix(wildcard): Wildcards allowing nonexistent VPin 33 tests(wildcard): Updated Wildcard Tests to include V0 Jun 20, 2019
@BradenM BradenM changed the title tests(wildcard): Updated Wildcard Tests to include V0 test(wildcard): Updated Wildcard Tests to include V0 Jun 20, 2019
@BradenM
Copy link
Contributor Author

BradenM commented Jun 20, 2019

For reference, here's there failed test log (same error for both read/write wildcard tests):

_____________________ TestBlynk.test_write_wildcard_event ______________________
        assert 'write v5' in bl._events.keys()
>       assert len(bl._events.keys()) == bl.VPIN_MAX_NUM
E       assert 33 == 32
E         -33
E         +32

Copy link
Collaborator

@antohaUa antohaUa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good for me

@antohaUa antohaUa merged commit 2631963 into blynkkk:master Jun 20, 2019
@antohaUa
Copy link
Collaborator

Thanks you for corrected tests - I forgot that they should be corrected too ))

@BradenM BradenM deleted the fix/4bd673b-tests branch June 20, 2019 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants