diff --git a/src/tests/test_appearance.py b/src/tests/test_appearance.py index 54568cf..bc79fe5 100644 --- a/src/tests/test_appearance.py +++ b/src/tests/test_appearance.py @@ -1,3 +1,8 @@ +import sys +import os + +sys.path.append(os.path.join(os.path.dirname(__file__), "..")) + from processpiper import ProcessMap, EventType, ActivityType, GatewayType from util_test import get_test_file_path diff --git a/src/tests/test_bpmn.py b/src/tests/test_bpmn.py index f0d14d7..d13a613 100644 --- a/src/tests/test_bpmn.py +++ b/src/tests/test_bpmn.py @@ -1,5 +1,9 @@ import re import xml.etree.ElementTree as ET +import sys +import os + +sys.path.append(os.path.join(os.path.dirname(__file__), "..")) from processpiper import ProcessMap, EventType, ActivityType, GatewayType from util_test import get_test_file_path, get_solution_file_path, mock_uuid diff --git a/src/tests/test_case01.py b/src/tests/test_case01.py index 54a8996..6bda90f 100644 --- a/src/tests/test_case01.py +++ b/src/tests/test_case01.py @@ -1,10 +1,15 @@ +import sys +import os + +sys.path.append(os.path.join(os.path.dirname(__file__), "..")) + from processpiper import ProcessMap, EventType, ActivityType, GatewayType from util_test import get_test_file_path def test_case01(): with ProcessMap( - "Pizza Order Process", colour_theme="BLUEMOUNTAIN" + "Pizza Order Process", colour_theme="BLUEMOUNTAIN" ) as my_process_map: with my_process_map.add_lane("Customer") as lane1: start = lane1.add_element("start", EventType.START) @@ -45,7 +50,7 @@ def test_case01(): def test_case02(): with ProcessMap( - "Sample Test Process", colour_theme="BLUEMOUNTAIN" + "Sample Test Process", colour_theme="BLUEMOUNTAIN" ) as my_process_map: with my_process_map.add_lane("End User") as lane1: start = lane1.add_element("Start", EventType.START) diff --git a/src/tests/test_processmapper.py b/src/tests/test_processmapper.py index 97ec7e1..a82f037 100644 --- a/src/tests/test_processmapper.py +++ b/src/tests/test_processmapper.py @@ -1,3 +1,8 @@ +import sys +import os + +sys.path.append(os.path.join(os.path.dirname(__file__), "..")) + from processpiper import ProcessMap, EventType, ActivityType, GatewayType from processpiper.coordinate import Side from util_test import get_test_file_path @@ -29,7 +34,7 @@ def test_case1(): def test_case2(): with ProcessMap( - "Product Order Processing", colour_theme="BLUEMOUNTAIN" + "Product Order Processing", colour_theme="BLUEMOUNTAIN" ) as my_process_map: with my_process_map.add_lane("Customer") as lane1: start = lane1.add_element("Start", EventType.START) @@ -153,7 +158,7 @@ def test_case4(): def test_case5(): with ProcessMap( - "Sample Test Process", colour_theme="BLUEMOUNTAIN" + "Sample Test Process", colour_theme="BLUEMOUNTAIN" ) as my_process_map: with my_process_map.add_lane("End User") as lane1: start = lane1.add_element("Start", EventType.START) @@ -287,7 +292,7 @@ def test_case9(): def test_case10(colour_theme: str = "BLUEMOUNTAIN"): with ProcessMap( - "Shipment Process of a Hardware Retailer", colour_theme=colour_theme + "Shipment Process of a Hardware Retailer", colour_theme=colour_theme ) as my_process_map: with my_process_map.add_pool("Hardware Retailer") as pool1: with pool1.add_lane("Logistics Manager") as lane1: diff --git a/src/tests/test_promo.py b/src/tests/test_promo.py index b5db75a..036deb2 100644 --- a/src/tests/test_promo.py +++ b/src/tests/test_promo.py @@ -1,3 +1,8 @@ +import sys +import os + +sys.path.append(os.path.join(os.path.dirname(__file__), "..")) + from processpiper import text2diagram from util_test import get_test_file_path @@ -10,12 +15,10 @@ def manual_test_promo(): (start) as start [Enter Keyword] as enter_keyword (end) as end - + start->enter_keyword->end """ output_file = get_test_file_path("test_promo_01.png") - text2diagram.render( - input_syntax, output_file, show_code=True - ) + text2diagram.render(input_syntax, output_file, show_code=True) diff --git a/src/tests/test_sample.py b/src/tests/test_sample.py index 36ce9ce..2e2be39 100644 --- a/src/tests/test_sample.py +++ b/src/tests/test_sample.py @@ -1,3 +1,7 @@ +import sys +import os + +sys.path.append(os.path.join(os.path.dirname(__file__), "..")) import pytest from processpiper import ProcessMap, EventType, ActivityType, GatewayType @@ -8,7 +12,7 @@ def test_sample01(): with ProcessMap( - "debug01", colour_theme="BLUEMOUNTAIN", width=8192 + "debug01", colour_theme="BLUEMOUNTAIN", width=8192 ) as my_process_map: with my_process_map.add_lane("customer") as lane1: start = lane1.add_element("start", EventType.START) @@ -74,7 +78,7 @@ def test_sample01(): def test_sample02(): with ProcessMap( - "debug", colour_theme="BLUEMOUNTAIN", width=10000 + "debug", colour_theme="BLUEMOUNTAIN", width=10000 ) as my_process_map: with my_process_map.add_pool("Pool") as pool1: with pool1.add_lane("lane1") as lane1: @@ -114,7 +118,7 @@ def test_sample02(): def test_sample03(): with ProcessMap( - "Break Glass Process", colour_theme="BLUEMOUNTAIN" + "Break Glass Process", colour_theme="BLUEMOUNTAIN" ) as my_process_map: with my_process_map.add_pool("Organisation") as pool1: with pool1.add_lane("ProductA User") as lane1: @@ -193,7 +197,7 @@ def test_sample03(): def test_sample04(): with ProcessMap( - "Break Glass Process", colour_theme="BLUEMOUNTAIN", painter_type="SVG" + "Break Glass Process", colour_theme="BLUEMOUNTAIN", painter_type="SVG" ) as my_process_map: with my_process_map.add_pool("Organisation") as pool1: with pool1.add_lane("ProductA User") as lane1: @@ -273,7 +277,9 @@ def test_sample04(): def test_sample05(): with pytest.raises(TooManyConnectionsException): with ProcessMap( - "Test Max Connection Process", colour_theme="BLUEMOUNTAIN", painter_type="SVG" + "Test Max Connection Process", + colour_theme="BLUEMOUNTAIN", + painter_type="SVG", ) as my_process_map: with my_process_map.add_lane("Test Lane") as lane1: start = lane1.add_element("start", EventType.START) @@ -303,7 +309,9 @@ def test_sample05(): def test_sample06(): with pytest.raises(TooManyConnectionsException): with ProcessMap( - "Test Max Connection Process", colour_theme="BLUEMOUNTAIN", painter_type="SVG" + "Test Max Connection Process", + colour_theme="BLUEMOUNTAIN", + painter_type="SVG", ) as my_process_map: with my_process_map.add_lane("Test Lane") as lane1: start = lane1.add_element("start", EventType.START) @@ -343,7 +351,7 @@ def test_sample06(): def test_sample07(): with ProcessMap( - "Product Feature Interface", colour_theme="BLUEMOUNTAIN" + "Product Feature Interface", colour_theme="BLUEMOUNTAIN" ) as my_process_map: with my_process_map.add_lane("system") as lane_system: node_start = lane_system.add_element("start", EventType.START) @@ -415,7 +423,7 @@ def test_sample07(): g3.connect(node_Update_Figma_Design_, "") with pool_Product_How.add_lane( - "Brokerage Squad; UXD" + "Brokerage Squad; UXD" ) as lane_Product_How_Brokerage_Squad__UXD: node_Work_with_Domains_SL = lane_Product_How_Brokerage_Squad__UXD.add_element( "Work with Domains SL (Bob\nTaiani, Chris Coale) to\ndevelop features UI stories", @@ -437,7 +445,7 @@ def test_sample07(): g4.connect(node_Create_feature_test_, "") with pool_Product_How.add_lane( - "Brokerage Squad" + "Brokerage Squad" ) as lane_Product_How_Brokerage_Squad: node_Implement_feature_UI = ( lane_Product_How_Brokerage_Squad.add_element( @@ -588,7 +596,7 @@ def test_sample10(): def test_sample11(): with ProcessMap( - "Are we living in simulation?", colour_theme="TEALWATERS" + "Are we living in simulation?", colour_theme="TEALWATERS" ) as process_map: with process_map.add_pool("The World") as pool: with pool.add_lane("You") as you: diff --git a/src/tests/test_text2diagram.py b/src/tests/test_text2diagram.py index a6993ce..0fdafe9 100644 --- a/src/tests/test_text2diagram.py +++ b/src/tests/test_text2diagram.py @@ -1,3 +1,7 @@ +import sys +import os + +sys.path.append(os.path.join(os.path.dirname(__file__), "..")) from processpiper import text2diagram from util_test import get_test_file_path