Skip to content

Commit

Permalink
refactor: remove dead to_int function
Browse files Browse the repository at this point in the history
  • Loading branch information
aidencullo committed May 8, 2024
1 parent a363deb commit 8cbd199
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 16 deletions.
7 changes: 0 additions & 7 deletions src/nomail/util.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,2 @@
from typing import Sequence


def split_bytes(byte_str: bytes) -> list[bytes]:
return byte_str.split(b' ') if byte_str else []


def to_int(collection: Sequence) -> list[int]:
return [int(item) for item in collection]
10 changes: 1 addition & 9 deletions tests/unit/util_test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from nomail.util import split_bytes, to_int
from nomail.util import split_bytes

import pytest

Expand All @@ -12,14 +12,6 @@ def byte_str(self):
def byte_arr(self):
return [b'1', b'2', b'3', b'4', b'5']

@pytest.fixture
def int_arr(self):
return [1, 2, 3, 4, 5]

def test_split_bytes(self, byte_str, byte_arr):
result = split_bytes(byte_str)
assert result == byte_arr

def test_to_int(self, byte_arr, int_arr):
result = to_int(byte_arr)
assert result == int_arr

0 comments on commit 8cbd199

Please sign in to comment.