def test_validate_x_values_valid_x_values(self):
     """_validate_x_values() should not throw an exception."""
     _validate_x_values([1, 2.0, 3], None, 3)
 def test_validate_x_values_invalid_x_tick_labels(self):
     """_validate_x_values() should raise a ValueError on an invalid number
     of x_tick_labels."""
     with npt.assert_raises(ValueError):
         _validate_x_values(None, ["T0"], len(self.ValidSingleSampleData))
 def test_validate_x_values_nonnumber_x_values(self):
     """_validate_x_values() should raise a ValueError on x_values that
     aren't numbers."""
     with npt.assert_raises(ValueError):
         _validate_x_values(["foo", 2, 3], None,
                            len(self.ValidSingleSampleData))
 def test_validate_x_values_invalid_x_values(self):
     """_validate_x_values() should raise a ValueError on an invalid number
     of x_values."""
     with npt.assert_raises(ValueError):
         _validate_x_values([1, 2, 3, 4], ["T0", "T1", "T2"],
                            len(self.ValidSingleSampleData))
Example #5
0
 def test_validate_x_values_valid_x_values(self):
     """_validate_x_values() should not throw an exception."""
     _validate_x_values([1, 2.0, 3], None, 3)
Example #6
0
 def test_validate_x_values_nonnumber_x_values(self):
     """_validate_x_values() should raise a ValueError on x_values that
     aren't numbers."""
     with npt.assert_raises(ValueError):
         _validate_x_values(["foo", 2, 3], None,
                            len(self.ValidSingleSampleData))
Example #7
0
 def test_validate_x_values_invalid_x_tick_labels(self):
     """_validate_x_values() should raise a ValueError on an invalid number
     of x_tick_labels."""
     with npt.assert_raises(ValueError):
         _validate_x_values(None, ["T0"], len(self.ValidSingleSampleData))
Example #8
0
 def test_validate_x_values_invalid_x_values(self):
     """_validate_x_values() should raise a ValueError on an invalid number
     of x_values."""
     with npt.assert_raises(ValueError):
         _validate_x_values([1, 2, 3, 4], ["T0", "T1", "T2"],
                            len(self.ValidSingleSampleData))