Skip to content

Commit

Permalink
chore: added ruff linter (#6)
Browse files Browse the repository at this point in the history
* chore: added ruff linter

* Update test_rfc1924.py

* Update test.yml
  • Loading branch information
0xflotus authored Jan 4, 2025
1 parent 1186a04 commit 2f306db
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,11 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install pytest
- name: Lint
uses: astral-sh/ruff-action@v3
with:
version: 0.8.6
args: check
src: "./rfc1924"
- name: Test with pytest
run: python -m pytest --doctest-modules
5 changes: 2 additions & 3 deletions rfc1924/tests/test_rfc1924.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from rfc1924 import *
import pytest
from rfc1924 import encode, decode, savings

def test_encode():
assert encode("2345:425:2ca1::567:5673:23b5") == "AN?6(i3Y+yVr74uX@J3P"
Expand All @@ -8,4 +7,4 @@ def test_decode():
assert decode("AN?6(i3Y+yVr74uX@J3P") == "2345:425:2ca1::567:5673:23b5"

def test_savings():
assert (savings("2345:425:2ca1::567:5673:23b5") == 'You saved 28%')
assert (savings("2345:425:2ca1::567:5673:23b5") == 'You saved 28%')

0 comments on commit 2f306db

Please sign in to comment.