/[thuban]/branches/WIP-pyshapelib-bramz/test/support.py
ViewVC logotype

Diff of /branches/WIP-pyshapelib-bramz/test/support.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1736 by bh, Mon Sep 22 18:46:56 2003 UTC revision 1872 by bh, Mon Oct 27 17:11:20 2003 UTC
# Line 58  def initthuban(): Line 58  def initthuban():
58              pass              pass
59          add_thuban_dir_to_path()          add_thuban_dir_to_path()
60          import thubaninit          import thubaninit
61    
62            # Install a dummy translation function so that importing
63            # Thuban.UI doesn't install a wx specific one for which would
64            # need to import wxPython
65            import Thuban
66            Thuban.install_translation_function(lambda s: s)
67    
68          _initthuban_done = 1          _initthuban_done = 1
69    
70    
# Line 115  class ThubanTestResult(unittest._TextTes Line 122  class ThubanTestResult(unittest._TextTes
122                      self.stream.writeln("    " + test.id())                      self.stream.writeln("    " + test.id())
123          unittest._TextTestResult.printErrors(self)          unittest._TextTestResult.printErrors(self)
124    
125        def getDescription(self, test):
126            return test.id()
127    
128    
129  class ThubanTestRunner(unittest.TextTestRunner):  class ThubanTestRunner(unittest.TextTestRunner):
130    
# Line 312  class FloatComparisonMixin: Line 322  class FloatComparisonMixin:
322          value in test and value is less than the optional parameter          value in test and value is less than the optional parameter
323          epsilon. If epsilon is not given use self.fp_epsilon.          epsilon. If epsilon is not given use self.fp_epsilon.
324          """          """
325            self.assertEquals(len(test), len(value))
326          for i in range(len(test)):          for i in range(len(test)):
327              self.assertFloatEqual(test[i], value[i], epsilon)              self.assertFloatEqual(test[i], value[i], epsilon)
328    

Legend:
Removed from v.1736  
changed lines
  Added in v.1872

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26