File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,20 @@ def test_make_aes2(self):
49
49
with self .assertRaises (ValueError ):
50
50
rplot .make_aes (alpha = rplot .ScaleShape ('test' ))
51
51
52
+ def test_dictionary_union (self ):
53
+ dict1 = {1 : 1 , 2 : 2 , 3 : 3 }
54
+ dict2 = {1 : 1 , 2 : 2 , 4 : 4 }
55
+ union = rplot .dictionary_union (dict1 , dict2 )
56
+ self .assertEqual (len (union ), 4 )
57
+ keys = union .keys ()
58
+ self .assertTrue (1 in keys )
59
+ self .assertTrue (2 in keys )
60
+ self .assertTrue (3 in keys )
61
+ self .assertTrue (4 in keys )
62
+ self .assertTrue (rplot .dictionary_union (dict1 , {}) == dict1 )
63
+ self .assertTrue (rplot .dictionary_union ({}, dict1 ) == dict1 )
64
+ self .assertTrue (rplot .dictionary_union ({}, {}) == {})
65
+
52
66
class TestScaleGradient (unittest .TestCase ):
53
67
def setUp (self ):
54
68
path = os .path .join (curpath (), 'data/iris.csv' )
You can’t perform that action at this time.
0 commit comments