FLEXPART Testing Environment CTBTO WO8
 All Classes Namespaces Files Functions Variables Pages
BasicTest.py
Go to the documentation of this file.
1 
2 
3 class BasicTest(object):
4 
5  """
6  Container for BasicTest properties
7  """
8 
9  def __init__(self, descr=None, test_type=None, threshold=None):
10 
11  if descr:
12  self._description = descr
13  else:
14  raise Exception('descr not defined')
15 
16  if test_type:
17  self._test_type = test_type
18  else:
19  raise Exception('test_type not defined')
20 
21  if threshold:
22  self._threshold = threshold
23  try:
24  dummy_var = float(threshold)
25  self._threshold = dummy_var
26  except:
27  raise Exception('threshold not a valid number')
28  else:
29  raise Exception('threshold not defined')
30 
31 
32  def get_descr(self):
33  return self._description
34 
35  def get_test_type(self):
36  return self._test_type
37 
38  def get_threshold(self):
39  return self._threshold
40 
41 
42