-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
version 0.2.0: GUID() now simply returns a string
- Loading branch information
Showing
8 changed files
with
62 additions
and
29 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
Binary file not shown.
Binary file not shown.
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,3 +1,3 @@ | ||
from guid.guid import GUID | ||
from guid.guid import slug_to_uuid | ||
from guid.guid import uuid_to_slug | ||
from guid.guid import uuid_to_guid | ||
from guid.guid import guid_to_uuid |
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,14 @@ | ||
[tool.poetry] | ||
name = "guid" | ||
version = "0.2.0" | ||
description = "Human friendly GUID/UUID library" | ||
authors = ["Logi Leifsson <[email protected]>"] | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.7" | ||
|
||
[tool.poetry.dev-dependencies] | ||
|
||
[build-system] | ||
requires = ["poetry-core>=1.0.0"] | ||
build-backend = "poetry.core.masonry.api" |
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,15 @@ | ||
recipes: | ||
test: | ||
vars: {} | ||
steps: | ||
- python -m unittest discover -v -s tests -p "*test*.py" | ||
|
||
build: | ||
vars: {} | ||
steps: | ||
- poetry build | ||
|
||
publish: | ||
vars: {} | ||
steps: | ||
- poetry publish |
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,10 +1,20 @@ | ||
from unittest import TestCase | ||
|
||
from guid import GUID | ||
from uuid import uuid4 | ||
from guid import uuid_to_guid | ||
from guid import guid_to_uuid | ||
|
||
|
||
class TestGUID(TestCase): | ||
def test_0(self): | ||
u1 = uuid4() | ||
g = uuid_to_guid(u1) | ||
u2 = guid_to_uuid(g) | ||
self.assertEqual(u1, u2) | ||
|
||
def test_1(self): | ||
guid = GUID() | ||
self.assertIsNotNone(guid.uuid) | ||
self.assertIsNotNone(guid.slug) | ||
g1 = GUID() | ||
u = guid_to_uuid(g1) | ||
g2 = uuid_to_guid(u) | ||
self.assertEqual(g1, g2) |