Back to index

python-biopython  1.60
Public Member Functions | Public Attributes
test_GraphicsDistribution.BarChartTest Class Reference

List of all members.

Public Member Functions

def setUp
def test_simple_page
def test_multi_page

Public Attributes

 simple_page
 multi_page
 num_multi

Detailed Description

Test display of BarChart distributions on a page.

Definition at line 42 of file test_GraphicsDistribution.py.


Member Function Documentation

Definition at line 45 of file test_GraphicsDistribution.py.

00045 
00046     def setUp(self):
00047         self.simple_page = os.path.join(os.getcwd(), "Graphics", "simple_bar.pdf")
00048         self.multi_page = os.path.join(os.getcwd(), "Graphics", "multi_bar.pdf")
00049 
00050         self.num_multi = 5
    
Create a page with multiple distributions on it.

Definition at line 64 of file test_GraphicsDistribution.py.

00064 
00065     def test_multi_page(self):
00066         """Create a page with multiple distributions on it.
00067         """
00068         dist_page = DistributionPage()
00069 
00070         dist_page.number_of_columns = 3
00071         
00072         for multi in range(self.num_multi):
00073             dist_info = []
00074             new_info = random_distribution()
00075             dist_info.append(new_info)
00076 
00077             distribution = BarChartDistribution(dist_info)
00078             distribution.chart_title = "Distribution %s" % (multi + 1)
00079             dist_page.distributions.append(distribution)
00080 
00081         dist_page.draw(self.multi_page, "Test Multi Bar Chart")

Here is the call graph for this function:

Test displaying a page with single distribution.

Definition at line 51 of file test_GraphicsDistribution.py.

00051 
00052     def test_simple_page(self):
00053         """Test displaying a page with single distribution.
00054         """
00055         dist_info = []
00056         new_info = random_distribution()
00057         dist_info.append(new_info)
00058         distribution = BarChartDistribution(dist_info)
00059 
00060         dist_page = DistributionPage()
00061         dist_page.distributions.append(distribution)
00062 
00063         dist_page.draw(self.simple_page, "Test Bar Chart")

Here is the call graph for this function:


Member Data Documentation

Definition at line 47 of file test_GraphicsDistribution.py.

Definition at line 49 of file test_GraphicsDistribution.py.

Definition at line 46 of file test_GraphicsDistribution.py.


The documentation for this class was generated from the following file: