From f2ddcb6007df6254388987cf217060694f11b605 Mon Sep 17 00:00:00 2001 From: "Sup#2.0" <102817779+Sup2point0@users.noreply.github.com> Date: Mon, 8 Apr 2024 16:28:53 +0100 Subject: [PATCH] develop tests --- tests/quarkify.py | 48 ++++++++++++++++++++++++++--------------------- 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/tests/quarkify.py b/tests/quarkify.py index c630b9c..06b1a9b 100644 --- a/tests/quarkify.py +++ b/tests/quarkify.py @@ -7,16 +7,11 @@ def test_live_positive(): result = quarkify.extract_quarks(''' - test - - test ''') - assert result["live"] is True, "live flag not triggered!" - assert result["path"] == "testing/test", "export path incorrect!" + assert "live" in result, "flag [live] doesn’t exist!" + assert result["live"] is True, "flag [live] not triggered!" def test_live_negative(): @@ -24,40 +19,32 @@ def test_live_negative(): try: quarkify.extract_quarks(''' - test - test - test - test ''') except quarkify.Quarkless: skips = True - assert skips + assert skips, "exception [Quarkless] not raised!" -def test_dead(): +def test_dead_positive(): skips = False try: - quarkify.extract_quarks(''' - test - test + result = quarkify.extract_quarks(''' - test - test ''') except quarkify.Quarkless: skips = True - assert skips + assert skips, "exception [Quarkless] not raised!" + assert result.get("live", False) is not True, "flag [live] set to True instead of False!" def test_data_single(): result = quarkify.extract_quarks(''' - - + ''') + + assert result["live"] is True + assert result["path"] == "testing/tester/test" + assert result["style"] == ["default", "special", "testing"] + assert result["duality"] == "light" + assert result["index"] == ["tests", "testing"] + assert result["date"] == ["24", "04", "02"]