Skip to content
Snippets Groups Projects
Commit ffe134af authored by angloth's avatar angloth
Browse files

Add some graphID test cases

parent 4a70f0b1
No related branches found
No related tags found
1 merge request!2Integrated ID system, traversing and som signal tests
import pytest
from test.fixtures.graph_id import *
"""
B-ASIC test suite for GraphID.
"""
from b_asic.graph_id import GraphID
import pytest
def test_create_graph_id():
graph_id = GraphID("add", 1)
assert graph_id.graph_id_type == "add"
assert graph_id.graph_id_number == 1
graph_id2 = GraphID("", 2)
assert graph_id2.graph_id_type == ""
assert graph_id2.graph_id_number == 2
graph_id3 = GraphID("ABCDEFGHIJKLMNOPQRSTUVWXYZ", 3)
assert graph_id3.graph_id_type == "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
assert graph_id3.graph_id_number == 3
def test_graph_id_str(graph_ids):
assert str(graph_ids[0]) == "add1"
assert str(graph_ids[1]) == "add2"
assert str(graph_ids[2]) == "sig1"
assert str(graph_ids[3]) == "sig1"
assert str(graph_ids[4]) == "sub3"
assert str(graph_ids[5]) == "ÅÄÖ2"
assert str(graph_ids[6]) == "3"
assert str(graph_ids[7]) == "ABCDEFGHIJKLMNOPQRSTUVWXYZ4"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment