FPv9.3.1FPv9.3.1b_testingFPv9.3.2fp9.3.1-20161214-nc4grib2nc4_repair
Last change
on this file since 29feaef was
496c607,
checked in by Don Morton <Don.Morton@…>, 8 years ago
|
Initial commit of FPv9.3.1
Currently, this is a clone of snapshot FPv9.3.0
|
-
Property mode set to
100644
|
File size:
925 bytes
|
Line | |
---|
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 | |
---|
Note: See
TracBrowser
for help on using the repository browser.