New test for node group versioning #111800
No reviewers
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#111800
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "LukasTonne/blender:test_nodegroup_compat"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This simply loads a blend file and tests that the node group interface
as well as a node group instance have all the expected sockets and
default values.
The test files are attached below temporarily for code review,
these will be uploaded to the svn test files repo in time.
Test case for 2.5:
Test case for 3.6:
Added a few inline comments, but generally looks good to me.
@ -0,0 +64,4 @@
@property
def idname(self):
global type_info
Is this
global
really necessary?No it's not, removed it.
@ -0,0 +90,4 @@
else:
self.assertAlmostEqual(value, expected)
def compare_spec(self, item, node, spec: SocketSpec, test_links=True):
Think the function name can be improved to make it more clear that we are only checking a single socket here. It's not necessarily obvious by looking at the signature.
changed to
@ -0,0 +93,4 @@
def compare_spec(self, item, node, spec: SocketSpec, test_links=True):
group = item.id_data
# Examine the interface item
End comments with dot.
@ -0,0 +181,4 @@
class NodeGroupVersioning36Test(AbstractNodeGroupInterfaceTest):
def open_file(self):
bpy.ops.wm.open_mainfile(filepath=str(self.testdir / "nodegroup36.blend"))
I wonder if we can check
bpy.data.version
to make sure that the file hasn't been saved in a newer version already accidentally.Added a test for this, works fine.
@ -0,0 +193,4 @@
self.assertEqual(node.node_tree, group, "Node group must use compositor node tree")
# autopep8: off
self.compare_spec( group.interface.ui_items[0], node, SocketSpec( "Output Float", "Output_9", "VALUE", hide_value=True, default_value=3.0, min_value=1.0, max_value=1.0))
Break into multiple lines.
I find it more readable with a single line per socket and the auto-formatting disabled. Can turn that back on if you feel strongly about it.
After make format:
I think just moving the
SocketSpec
on the next line is good enough as well (so that the long line is approximately split in half). Autoformatting can still be disabled.I've realized that i can just put all the specs in a list since i'm testing all the sockets one by one anyway. Nice and compact now.
global
. 05dbe238e3@blender-bot build
WIP: New test for node group versioningto New test for node group versioning@blender-bot build