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

Another way to check if pass the test #66

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
5 changes: 4 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,11 @@ You can contribute in many ways:
```shell
$ py.test
```
6. If execute py.test and always collect 0 items, then you can try to run

6. Commit your changes and push your branch to GitHub::
if your install success and execute just like you expect, then you can suggest that you have already pass the test.

7. Commit your changes and push your branch to GitHub::

```shell
$ git add .
Expand Down
3 changes: 3 additions & 0 deletions PyBeacon/PyBeacon.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ def encodeurl(url):
data.append(s)
i += len(scheme)
break
"""if never match to if, then throw exception."""
else:
raise Exception("Invalid url scheme")

Expand Down Expand Up @@ -111,6 +112,7 @@ def encodeUid(uid):
ret = []
for i in range(0, len(uid), 2):
ret.append(int(uid[i:i+2], 16))
"""Python's final character"""
Copy link
Collaborator

Choose a reason for hiding this comment

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

Change this to Final byte stream character in Python

ret.append(0x00)
ret.append(0x00)
return ret
Expand All @@ -119,6 +121,7 @@ def uidIsValid(uid):
"""UID Validation."""
if len(uid) == 32:
try:
"""UID characters must belong to base 16"""
int(uid, 16)
return True
except ValueError:
Expand Down