Back to index

python-biopython  1.60
Public Member Functions | Public Attributes | Private Member Functions
test_GraphicsGeneral.ComparativeTest Class Reference

List of all members.

Public Member Functions

def setUp
def test_simple_scatter_plot

Public Attributes

 min_two_d_lists
 max_two_d_lists
 min_num_points
 max_num_points
 min_point_num
 max_point_num

Private Member Functions

def _make_random_points

Detailed Description

Do tests for modules involved with comparing data.

Definition at line 38 of file test_GraphicsGeneral.py.


Member Function Documentation

Make a bunch of random points for testing plots.

Definition at line 51 of file test_GraphicsGeneral.py.

00051 
00052     def _make_random_points(self):
00053         """Make a bunch of random points for testing plots.
00054         """
00055         plot_info = []
00056         num_two_d_lists = random.randrange(self.min_two_d_lists,
00057                                            self.max_two_d_lists)
00058 
00059         for two_d_list in range(num_two_d_lists):
00060             cur_list = []
00061             num_points = random.randrange(self.min_num_points,
00062                                           self.max_num_points)
00063             for point in range(num_points):
00064                 x_point = random.randrange(self.min_point_num,
00065                                            self.max_point_num)
00066                 y_point = random.randrange(self.min_point_num,
00067                                            self.max_point_num)
00068 
00069                 cur_list.append((x_point, y_point))
00070 
00071             plot_info.append(cur_list)
00072         return plot_info
                

Here is the caller graph for this function:

Definition at line 41 of file test_GraphicsGeneral.py.

00041 
00042     def setUp(self):
00043         self.min_two_d_lists = 1
00044         self.max_two_d_lists = 7
00045 
00046         self.min_num_points = 1
00047         self.max_num_points = 500
00048 
00049         self.min_point_num = 0
00050         self.max_point_num = 200

Test creation of a simple ScatterPlot.

Definition at line 73 of file test_GraphicsGeneral.py.

00073 
00074     def test_simple_scatter_plot(self):
00075         """Test creation of a simple ScatterPlot.
00076         """
00077         compare_plot = ComparativeScatterPlot()
00078         compare_plot.display_info = self._make_random_points()
00079 
00080         output_file = os.path.join(os.getcwd(), "Graphics", "scatter_test.pdf")
00081         try:
00082             compare_plot.draw_to_file(output_file, "Testing Scatter Plots")
00083         # there is a bug in reportlab which occasionally generates an
00084         # error here.
00085         except IndexError:
00086             pass

Here is the call graph for this function:


Member Data Documentation

Definition at line 46 of file test_GraphicsGeneral.py.

Definition at line 49 of file test_GraphicsGeneral.py.

Definition at line 43 of file test_GraphicsGeneral.py.

Definition at line 45 of file test_GraphicsGeneral.py.

Definition at line 48 of file test_GraphicsGeneral.py.

Definition at line 42 of file test_GraphicsGeneral.py.


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