Changeset 112 for trunk

Show
Ignore:
Timestamp:
10/28/08 16:28:25 (4 years ago)
Author:
lgs
Message:

Remove whitespace

Location:
trunk
Files:
8 modified

Legend:

Unmodified
Added
Removed
  • trunk/examples/scatterchart.py

    r85 r112  
    2828    surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, 400, 200) 
    2929 
    30      
     30 
    3131    dataSet = ( 
    3232        ('points', [(i, random.random() * 100.0) for i in range(100)]), 
  • trunk/setup.py

    r91 r112  
    3535    license="LGPL 3", 
    3636    keywords="chart cairo", 
    37     packages=['pycha'], 
    38     package_dir={'pycha': 'src'}, 
     37    packages=['pycha', 'chavier'], 
     38    package_dir={'pycha': 'src', 'chavier': 'chavier'}, 
    3939    url='http://www.lorenzogil.com/projects/pycha/', 
    4040    # if would be nice if pycairo would have an egg (sigh) 
  • trunk/src/bar.py

    r109 r112  
    8787                    cx.set_source_rgb(*self.options.colorScheme[bar.name]) 
    8888                    cx.fill_preserve() 
    89      
     89 
    9090                if not self.options.stroke.hide: 
    9191                    cx.set_source_rgb(*hex2rgb(self.options.stroke.color)) 
  • trunk/tests/bar.py

    r109 r112  
    170170            self.assertAlmostEqual(ch.yticks[i][0], yticks[i][0], 4) 
    171171            self.assertAlmostEqual(ch.yticks[i][1], yticks[i][1], 4) 
    172              
     172 
    173173    def test_udpateTicksWithNegatives(self): 
    174174        surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, 500, 500) 
     
    244244            ('dataset1', ([0, -3], [1, -1], [2, 3], [3, 5])), 
    245245            ) 
    246   
     246 
    247247        ch = pycha.bar.HorizontalBarChart(surface) 
    248248        ch.addDataset(dataset) 
  • trunk/tests/chart.py

    r109 r112  
    2323 
    2424class FunctionsTests(unittest.TestCase): 
    25      
     25 
    2626    def test_uniqueIndices(self): 
    2727        arr = (range(10), range(5), range(20), range(30)) 
     
    3838 
    3939class AreaTests(unittest.TestCase): 
    40      
     40 
    4141    def test_area(self): 
    4242        area = pycha.chart.Area(10, 20, 100, 300) 
     
    5050 
    5151class OptionTests(unittest.TestCase): 
    52      
     52 
    5353    def test_options(self): 
    5454        opt = pycha.chart.Option(a=1, b=2, c=3) 
     
    7070        # new attributes not present in original option are not merged 
    7171        self.assertRaises(AttributeError, getattr, opt.c, 'f') 
    72          
     72 
    7373        opt.merge(pycha.chart.Option(a=10, b=20)) 
    7474        self.assertEqual(opt.a, 10) 
     
    7676 
    7777class ChartTests(unittest.TestCase): 
    78      
     78 
    7979    def test_init(self): 
    8080        ch = pycha.chart.Chart(None) 
     
    9393        self.assertEqual(ch.yticks, []) 
    9494        self.assertEqual(ch.options, pycha.chart.DEFAULT_OPTIONS) 
    95      
     95 
    9696    def test_datasets(self): 
    9797        ch = pycha.chart.Chart(None) 
     
    104104        self.assertEqual(ch._getDatasetsValues(), 
    105105                         [d1[1], d2[1], d3[1]]) 
    106      
     106 
    107107    def test_options(self): 
    108108        ch = pycha.chart.Chart(None) 
     
    144144        ch = pycha.chart.Chart(None, {'colorScheme': (0.0, 0.0, 0.0)}) 
    145145        self.assertRaises(TypeError, ch._setColorscheme) 
    146      
     146 
    147147    def test_updateXY(self): 
    148148        surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, 500, 500) 
     
    166166        self.assertEqual(ch.yrange, 4) 
    167167        self.assertEqual(ch.yscale, 1/4.0) 
    168          
    169168        # TODO: test with different options (axis.range, ...) 
    170169 
     
    207206        self.assertAlmostEqual(ch.yticks[1][0], 2/3.0, 4) 
    208207        self.assertAlmostEqual(ch.yticks[2][0], 1/3.0, 4) 
    209          
     208 
    210209    def test_abstractChart(self): 
    211210        ch = pycha.chart.Chart(None) 
  • trunk/tests/color.py

    r85 r112  
    8787    def test_autoLighting(self): 
    8888        """This test ensures that the colors don't get to white too fast. 
    89          
     89 
    9090        See bug #8. 
    9191        """ 
     
    9595        color = '#ff0000' 
    9696        scheme = pycha.color.generateColorscheme(color, keys) 
    97          
     97 
    9898        # ensure that the last color is not completely white 
    9999        color = scheme[n-1] 
     
    101101        self.assertNotAlmostEqual(color[1], 1.0, 4) 
    102102        self.assertNotAlmostEqual(color[2], 1.0, 4) 
    103          
     103 
    104104def test_suite(): 
    105105    return unittest.TestSuite(( 
  • trunk/tests/line.py

    r109 r112  
    2323 
    2424class PointTests(unittest.TestCase): 
    25      
     25 
    2626    def test_point(self): 
    2727        point = pycha.line.Point(2, 3, 1.0, 2.0, "test") 
  • trunk/tests/pie.py

    r110 r112  
    123123                                     ('dataset2', 'dataset2 (20.0%)'), 
    124124                                     ('dataset3', 'dataset3 (70.0%)')]) 
    125          
    126125 
    127126