File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,17 @@ def test_dictionary_union(self):
63
63
self .assertTrue (rplot .dictionary_union ({}, dict1 ) == dict1 )
64
64
self .assertTrue (rplot .dictionary_union ({}, {}) == {})
65
65
66
+ def test_merge_aes (self ):
67
+ layer1 = rplot .Layer (size = rplot .ScaleSize ('test' ))
68
+ layer2 = rplot .Layer (shape = rplot .ScaleShape ('test' ))
69
+ rplot .merge_aes (layer1 , layer2 )
70
+ self .assertTrue (isinstance (layer2 .aes ['size' ], rplot .ScaleSize ))
71
+ self .assertTrue (isinstance (layer2 .aes ['shape' ], rplot .ScaleShape ))
72
+ self .assertTrue (layer2 .aes ['size' ] == layer1 .aes ['size' ])
73
+ for key in layer2 .aes .keys ():
74
+ if key != 'size' and key != 'shape' :
75
+ self .assertTrue (layer2 .aes [key ] is None )
76
+
66
77
class TestScaleGradient (unittest .TestCase ):
67
78
def setUp (self ):
68
79
path = os .path .join (curpath (), 'data/iris.csv' )
You can’t perform that action at this time.
0 commit comments