Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 89a57d1497
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 32 lines (21 sloc) 0.805 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
import os, unittest, logging

def suite():
  suite = unittest.TestSuite()
  suite.addTest(FlexwinIOTests('test_readParameterFile'))
  return suite

#@unittest.skip('Not bothering with this test')
class FlexwinIOTests(unittest.TestCase):

  def setUp(self):
    pass

  def test_readParameterFile(self):
    from flexwin_io import readParameterFile
  
    filename=os.path.join('test_data','PAR_FILE')
    p=readParameterFile(filename)
    
    self.assertTrue(p['DEBUG'])
    self.assertFalse(p['BODY_WAVE_ONLY'])
    self.assertAlmostEqual(p['WIN_MAX_PERIOD'],150.0)
    self.assertAlmostEqual(p['C_0'],0.7)

if __name__ == '__main__':

  import logging
  logging.basicConfig(level=logging.INFO, format='%(levelname)s : %(asctime)s : %(message)s')
 
  unittest.TextTestRunner(verbosity=2).run(suite())
 
Something went wrong with that request. Please try again.