@@ -839,14 +839,27 @@ def test_virtual_display(self):
839
839
self .assertEqual (1 , len (cfg .getViews (OCIO .VIEW_SHARED , "sRGB" )))
840
840
841
841
self .assertTrue (cfg .displayHasView ("sRGB" , "sview1" ))
842
+ self .assertFalse (cfg .displayHasView ("sRGB" , "sview2" ))
843
+ self .assertFalse (cfg .displayHasView ("sRGB" , " " ))
844
+
842
845
self .assertTrue (cfg .viewIsShared ("sRGB" , "sview1" ))
846
+ self .assertFalse (cfg .viewIsShared ("sRGB" , "Raw" ))
847
+ self .assertFalse (cfg .viewIsShared ("sRGB" , " " ))
843
848
844
849
other = copy .deepcopy (cfg )
845
850
846
851
self .assertTrue (OCIO .Config .ViewsAreEqual (cfg , other , "sRGB" , "sview1" ))
847
852
self .assertTrue (OCIO .Config .ViewsAreEqual (cfg , other , "sRGB" , "Raw" ))
848
853
self .assertTrue (OCIO .Config .ViewsAreEqual (cfg , other , "sRGB" , "view" ))
849
854
855
+ cfg .removeDisplayView ("sRGB" , "sview1" )
856
+ cfg .removeDisplayView ("sRGB" , "Raw" )
857
+ cfg .removeDisplayView ("sRGB" , "view" )
858
+
859
+ self .assertFalse (OCIO .Config .ViewsAreEqual (cfg , other , "sRGB" , "sview1" ))
860
+ self .assertFalse (OCIO .Config .ViewsAreEqual (cfg , other , "sRGB" , "Raw" ))
861
+ self .assertFalse (OCIO .Config .ViewsAreEqual (cfg , other , "sRGB" , "view" ))
862
+
850
863
# Validate the virtual display information
851
864
self .assertEqual (
852
865
2 ,
@@ -885,11 +898,28 @@ def test_virtual_display(self):
885
898
self .assertTrue (cfg .virtualViewIsShared ("sview2" ))
886
899
self .assertTrue (OCIO .Config .VirtualViewsAreEqual (cfg , other , "sview2" ))
887
900
901
+ other .addVirtualDisplayView ("sview3" , "" , "raw" )
902
+
903
+ self .assertFalse (cfg .hasVirtualView ("sview3" ))
904
+ self .assertTrue (other .hasVirtualView ("sview3" ))
905
+ self .assertFalse (OCIO .Config .VirtualViewsAreEqual (cfg , other , "sview3" ))
906
+
907
+ # Test a virtual view that doesn't exist in either
908
+ self .assertFalse (cfg .hasVirtualView (" " ))
909
+ self .assertFalse (other .hasVirtualView (" " ))
910
+ self .assertFalse (OCIO .Config .VirtualViewsAreEqual (cfg , other , " " ))
911
+
912
+ self .assertFalse (cfg .hasVirtualView ("nonexistent" ))
913
+ self .assertFalse (other .hasVirtualView ("nonexistent" ))
914
+ self .assertFalse (OCIO .Config .VirtualViewsAreEqual (cfg , other , "nonexistent" ))
915
+
888
916
# Remove a view from the virtual display
889
917
cfg .removeVirtualDisplayView ("Raw" )
890
918
891
- self .assertFalse (OCIO .Config .VirtualViewsAreEqual (cfg , other , "Raw" ))
892
919
self .assertFalse (cfg .hasVirtualView ("Raw" ))
920
+ self .assertTrue (other .hasVirtualView ("Raw" ))
921
+
922
+ self .assertFalse (OCIO .Config .VirtualViewsAreEqual (cfg , other , "Raw" ))
893
923
894
924
self .assertEqual (
895
925
1 ,
@@ -911,6 +941,10 @@ def test_virtual_display(self):
911
941
912
942
self .assertFalse (cfg .hasVirtualView ("sview2" ))
913
943
self .assertFalse (cfg .virtualViewIsShared ("sview2" ))
944
+
945
+ self .assertTrue (other .hasVirtualView ("sview2" ))
946
+ self .assertTrue (other .virtualViewIsShared ("sview2" ))
947
+
914
948
self .assertFalse (OCIO .Config .VirtualViewsAreEqual (cfg , other , "sview2" ))
915
949
916
950
cfg .addVirtualDisplaySharedView ("sview2" )
0 commit comments