Back to index

python3.2  3.2.2
Public Member Functions | Private Member Functions
test.test_winsound.BeepTest Class Reference

List of all members.

Public Member Functions

def test_errors
def test_extremes
def test_increasingfrequency

Private Member Functions

def _beep

Detailed Description

Definition at line 32 of file test_winsound.py.


Member Function Documentation

def test.test_winsound.BeepTest._beep (   self,
  args 
) [private]

Definition at line 54 of file test_winsound.py.

00054 
00055     def _beep(self, *args):
00056         # these tests used to use _have_soundcard(), but it's quite
00057         # possible to have a soundcard, and yet have the beep driver
00058         # disabled. So basically, we have no way of knowing whether
00059         # a beep should be produced or not, so currently if these
00060         # tests fail we're ignoring them
00061         #
00062         # XXX the right fix for this is to define something like
00063         # _have_enabled_beep_driver() and use that instead of the
00064         # try/except below
00065         try:
00066             winsound.Beep(*args)
00067         except RuntimeError:
00068             pass

Here is the caller graph for this function:

Definition at line 41 of file test_winsound.py.

00041 
00042     def test_errors(self):
00043         self.assertRaises(TypeError, winsound.Beep)
00044         self.assertRaises(ValueError, winsound.Beep, 36, 75)
00045         self.assertRaises(ValueError, winsound.Beep, 32768, 75)

Here is the call graph for this function:

Definition at line 46 of file test_winsound.py.

00046 
00047     def test_extremes(self):
00048         self._beep(37, 75)
00049         self._beep(32767, 75)

Here is the call graph for this function:

Definition at line 50 of file test_winsound.py.

00050 
00051     def test_increasingfrequency(self):
00052         for i in range(100, 2000, 100):
00053             self._beep(i, 75)

Here is the call graph for this function:


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