Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aminalaee committed Jun 15, 2024
1 parent 3669410 commit 5d0a46c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 15 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,13 @@ env:

jobs:
lint:
name: "Check code quality Python ${{ matrix.python-version }}"
name: Check code quality
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "${{ matrix.python-version }}"
python-version: "3.10"
- name: Install dependencies
run: pip install -r requirements.txt
- name: Check code
Expand Down
16 changes: 6 additions & 10 deletions tests/test_uuid.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,9 @@ def test_uuid1() -> None:
assert isinstance(uuid, uuid_utils.UUID)


def test_uuid3() -> None:
uuid = uuid_utils.uuid3(namespace=uuid_utils.NAMESPACE_DNS, name="python.org")
assert isinstance(uuid, uuid_utils.UUID)

uuid = uuid_utils.uuid3(namespace=uuid_utils.NAMESPACE_DNS, name=b"python.org")
@pytest.mark.parametrize("name", ["python.org", b"python.org"])
def test_uuid3(name: str) -> None:
uuid = uuid_utils.uuid3(namespace=uuid_utils.NAMESPACE_DNS, name=name)
assert isinstance(uuid, uuid_utils.UUID)


Expand All @@ -86,11 +84,9 @@ def test_uuid4() -> None:
assert isinstance(uuid, uuid_utils.UUID)


def test_uuid5() -> None:
uuid = uuid_utils.uuid5(namespace=uuid_utils.NAMESPACE_DNS, name="python.org")
assert isinstance(uuid, uuid_utils.UUID)

uuid = uuid_utils.uuid5(namespace=uuid_utils.NAMESPACE_DNS, name=b"python.org")
@pytest.mark.parametrize("name", ["python.org", b"python.org"])
def test_uuid5(name: str) -> None:
uuid = uuid_utils.uuid5(namespace=uuid_utils.NAMESPACE_DNS, name=name)
assert isinstance(uuid, uuid_utils.UUID)


Expand Down

0 comments on commit 5d0a46c

Please sign in to comment.