Skip to content

Commit

Permalink
add node parameter evaluation context test
Browse files Browse the repository at this point in the history
  • Loading branch information
pedohorse committed Jun 30, 2024
1 parent 3dde637 commit 6f41ffe
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
Binary file added tests/nodes/data/test_basic_stuff.db
Binary file not shown.
47 changes: 47 additions & 0 deletions tests/nodes/test_basic_features_integration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
from lifeblood_testing_common.integration_common import FullIntegrationTestCase

from typing import Iterable, Tuple


class TestNodeStuff(FullIntegrationTestCase):
@classmethod
def _initial_db_file(cls) -> str:
return 'data/test_basic_stuff.db'

@classmethod
def node_configs(cls) -> Tuple[dict, dict]:
return {'set_attrib': {
'conf1': 12,
'conf2': 2.345,
}}, {
'conf1': 55,
'conf3': 'foo be me',
}

async def _create_test_tasks(self) -> Iterable[int]:
tasks = [
*await self._create_task(node_name='IN EXPR CONTEXT'),
]
return tasks

def _expected_task_attributes(self):
return {
0: {
'test1': 12,
'test2': 2.345,
'test3': 'foo be me',
'test4': '12',
},
}

async def _additional_checks_on_finish(self):
pass

def _minimal_idle_to_ensure(self) -> int:
return 0

def _minimal_total_to_ensure(self) -> int:
return 0

def _timeout(self) -> float:
return 30.0

0 comments on commit 6f41ffe

Please sign in to comment.