示例#1
0
 def test_style_transfer(self):
     hist = self.hist.opts(style={'style1': 'style_child'})
     hist2 = self.hist.opts()
     opts = Store.lookup_options('matplotlib', hist2, 'style').kwargs
     self.assertEqual(opts, {'style1': 'style1', 'style2': 'style2'})
     Store.transfer_options(hist, hist2, 'matplotlib')
     opts = Store.lookup_options('matplotlib', hist2, 'style').kwargs
     self.assertEqual(opts, {'style1': 'style_child', 'style2': 'style2'})
示例#2
0
 def test_style_transfer(self):
     hist = self.hist.opts(style={'style1':'style_child'})
     hist2 = self.hist.opts()
     opts = Store.lookup_options('matplotlib', hist2, 'style').kwargs
     self.assertEqual(opts, {'style1': 'style1', 'style2': 'style2'})
     Store.transfer_options(hist, hist2, 'matplotlib')
     opts = Store.lookup_options('matplotlib', hist2, 'style').kwargs
     self.assertEqual(opts, {'style1': 'style_child', 'style2': 'style2'})
示例#3
0
    def test_style_transfer(self):
        if 'matplotlib' not in Store.renderers:
            raise SkipTest("test_style_transfer requires matplotlib")

        hist = self.hist.opts(style={'style1': 'style_child'})
        hist2 = self.hist.opts()
        opts = Store.lookup_options('matplotlib', hist2, 'style').kwargs
        self.assertEqual(opts, {'style1': 'style1', 'style2': 'style2'})
        Store.transfer_options(hist, hist2, 'matplotlib')
        opts = Store.lookup_options('matplotlib', hist2, 'style').kwargs
        self.assertEqual(opts, {'style1': 'style_child', 'style2': 'style2'})
示例#4
0
    def test_style_transfer(self):
        if 'matplotlib' not in Store.renderers:
            raise SkipTest("test_style_transfer requires matplotlib")

        hist = self.hist.opts(style={'style1':'style_child'})
        hist2 = self.hist.opts()
        opts = Store.lookup_options('matplotlib', hist2, 'style').kwargs
        self.assertEqual(opts, {'style1': 'style1', 'style2': 'style2'})
        Store.transfer_options(hist, hist2, 'matplotlib')
        opts = Store.lookup_options('matplotlib', hist2, 'style').kwargs
        self.assertEqual(opts, {'style1': 'style_child', 'style2': 'style2'})