From 4a70f0b192ea4fd7a159326789b0556caca85340 Mon Sep 17 00:00:00 2001 From: angloth <angus.lothian@hotmail.com> Date: Thu, 27 Feb 2020 18:09:11 +0100 Subject: [PATCH] Add some graphID test fixtures --- test/fixtures/graph_id.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 test/fixtures/graph_id.py diff --git a/test/fixtures/graph_id.py b/test/fixtures/graph_id.py new file mode 100644 index 00000000..af6a37f8 --- /dev/null +++ b/test/fixtures/graph_id.py @@ -0,0 +1,19 @@ +import pytest +from b_asic import GraphID, GraphIDGenerator + +""" +Use a fixture for initializing objects and pass them as argument to a test function +""" +@pytest.fixture +def graph_id(): + return GraphID("add", 1) + + +@pytest.fixture +def graph_ids(): + return [GraphID("add", 1), GraphID("add", 2), \ + GraphID("sig", 1), GraphID("sig", 1), GraphID("sub", 3), \ + GraphID("ÅÄÖ", 2), GraphID("", 3), \ + GraphID("ABCDEFGHIJKLMNOPQRSTUVWXYZ", 4)] + + -- GitLab