mirror of
https://github.com/jongracecox/anybadge.git
synced 2025-12-16 10:30:05 +01:00
Allow tests to run from outside project directory
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
from pathlib import Path
|
||||
from unittest import TestCase
|
||||
from anybadge import Badge
|
||||
from anybadge.cli import main, parse_args
|
||||
@@ -234,7 +235,7 @@ class TestAnybadge(TestCase):
|
||||
self.assertTrue("font_size=10" in badge_repr)
|
||||
|
||||
def test_template_from_file(self):
|
||||
file = "tests/template.svg"
|
||||
file = Path(__file__).parent / Path("template.svg")
|
||||
badge = Badge("template from file", value=file, template=file)
|
||||
_ = badge.badge_svg_text
|
||||
|
||||
|
||||
Reference in New Issue
Block a user