Коммит 41351866 создал по автору Durman's avatar Durman
Просмотр файлов

fix tests which read data from input sockets without passing the data from output sockets first

владелец 8ba41e88
......@@ -194,7 +194,7 @@ def get_output_socket_data(node, output_socket_name):
Get data that the node has written to the output socket.
Raises SvNoDataError if it hasn't written any.
"""
socket = node.inputs[output_socket_name] # todo why output?
socket = node.outputs[output_socket_name]
sock_address = socket.socket_id
if sock_address in socket_data_cache:
return socket_data_cache[sock_address]
......
from sverchok.old_nodes import is_old
from sverchok.utils.dummy_nodes import is_dependent
from sverchok.utils.testing import *
from sverchok.ui.sv_examples_menu import example_categories_names
......@@ -7,6 +8,7 @@ class ScriptUvImportTest(SverchokTestCase):
def test_script_uv_import(self):
with self.temporary_node_tree("ImportedTree") as new_tree:
new_tree.sv_process = False
path = self.get_reference_file_path("script_uv.json")
importer = JSONImporter.init_from_path(path)
importer.import_into_tree(new_tree, print_log=False)
......@@ -27,6 +29,7 @@ class ProfileImportTest(SverchokTestCase):
def test_profile_import(self):
with self.temporary_node_tree("ImportedTree") as new_tree:
new_tree.sv_process = False
importer = JSONImporter.init_from_path(self.get_reference_file_path("profile.json"))
importer.import_into_tree(new_tree, print_log=False)
if importer.has_fails:
......@@ -37,6 +40,7 @@ class MeshExprImportTest(SverchokTestCase):
def test_mesh_expr_import(self):
with self.temporary_node_tree("ImportedTree") as new_tree:
new_tree.sv_process = False
importer = JSONImporter.init_from_path(self.get_reference_file_path("mesh.json"))
importer.import_into_tree(new_tree, print_log=False)
if importer.has_fails:
......
......@@ -16,6 +16,7 @@ class TextViewerTest(EmptyTreeTestCase):
# Trigger processing of Cylinder node
cyl.process()
viewer_text.inputs[0].sv_set(cyl.outputs['Edges'].sv_get())
# Invoke "VIEW" operator
bpy.ops.node.sverchok_viewer_buttonmk1('EXEC_DEFAULT', treename=self.tree.name, nodename=viewer_text.name)
......
from sverchok.core.update_system import prepare_input_data
from mathutils import Matrix
from sverchok.core.socket_conversions import ImplicitConversionProhibited
from sverchok.utils.testing import *
......@@ -19,6 +19,7 @@ class SocketConversionTests(EmptyTreeTestCase):
# Trigger processing of NGon node
ngon.process()
prepare_input_data([ngon.outputs['Vertices']], [matrix_apply.inputs['Matrixes']])
# Read what MatrixApply node sees
data =[[v[:] for v in m] for m in matrix_apply.inputs['Matrixes'].sv_get()]
......@@ -114,6 +115,7 @@ class SocketConversionTests(EmptyTreeTestCase):
# We do not actually care about the data
# itself, it is only important that there
# was no exception.
node.inputs[input_name].sv_set(ngon.outputs['Vertices'].sv_get())
data = node.inputs[input_name].sv_get()
except ImplicitConversionProhibited as e:
raise e
......
Поддерживает Markdown
0% или .
You are about to add 0 people to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Пожалуйста, зарегистрируйтесь или чтобы прокомментировать