feat: add a bsic volume test
This commit is contained in:
21
tests/test_bl_types/test_volume.py
Normal file
21
tests/test_bl_types/test_volume.py
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
import os
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
from deepdiff import DeepDiff
|
||||||
|
|
||||||
|
import bpy
|
||||||
|
import random
|
||||||
|
from multi_user.bl_types.bl_volume import BlVolume
|
||||||
|
|
||||||
|
def test_volume(clear_blend):
|
||||||
|
datablock = bpy.data.volumes.new("Test")
|
||||||
|
|
||||||
|
implementation = BlVolume()
|
||||||
|
expected = implementation._dump(datablock)
|
||||||
|
bpy.data.volumes.remove(datablock)
|
||||||
|
|
||||||
|
test = implementation._construct(expected)
|
||||||
|
implementation._load(expected, test)
|
||||||
|
result = implementation._dump(test)
|
||||||
|
|
||||||
|
assert not DeepDiff(expected, result)
|
Reference in New Issue
Block a user