diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 548e7df..ab89d8e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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 . diff --git a/PyBeacon/PyBeacon.py b/PyBeacon/PyBeacon.py index a5ae11a..e1b5c35 100644 --- a/PyBeacon/PyBeacon.py +++ b/PyBeacon/PyBeacon.py @@ -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") @@ -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""" ret.append(0x00) ret.append(0x00) return ret @@ -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: