Skip to content

Commit

Permalink
Skip coverage of test util functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Archmonger committed Oct 2, 2024
1 parent bb2e846 commit 7fc14c0
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 13 deletions.
1 change: 1 addition & 0 deletions tests/django_urls.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# pragma: no cover
from __future__ import annotations

from django.urls import path
Expand Down
30 changes: 17 additions & 13 deletions tests/test_string_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,25 @@
from servestatic.utils import ensure_leading_trailing_slash


class EnsureLeadingTrailingSlashTests:
def test_none(self):
assert ensure_leading_trailing_slash(None) == "/"
def test_none(self):
assert ensure_leading_trailing_slash(None) == "/"

def test_empty(self):
assert ensure_leading_trailing_slash("") == "/"

def test_slash(self):
assert ensure_leading_trailing_slash("/") == "/"
def test_empty(self):
assert ensure_leading_trailing_slash("") == "/"

def test_contents(self):
assert ensure_leading_trailing_slash("/foo/") == "/foo/"

def test_leading(self):
assert ensure_leading_trailing_slash("/foo") == "/foo"
def test_slash(self):
assert ensure_leading_trailing_slash("/") == "/"

def test_trailing(self):
assert ensure_leading_trailing_slash("foo/") == "/foo"

def test_contents(self):
assert ensure_leading_trailing_slash("/foo/") == "/foo/"


def test_leading(self):
assert ensure_leading_trailing_slash("/foo") == "/foo"


def test_trailing(self):
assert ensure_leading_trailing_slash("foo/") == "/foo"
1 change: 1 addition & 0 deletions tests/utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# pragma: no cover
from __future__ import annotations

import os
Expand Down

0 comments on commit 7fc14c0

Please sign in to comment.