Matteo Scandolo | 67654fa | 2017-06-09 09:33:17 -0700 | [diff] [blame] | 1 | import os |
2 | |||||
3 | # Constants | ||||
4 | OUTPUT_DIR = os.path.abspath(os.path.dirname(os.path.realpath(__file__)) + "/out/") | ||||
5 | |||||
6 | TMP_TARGET_PATH = os.path.join(OUTPUT_DIR, 'tmp.xtarget') | ||||
7 | |||||
8 | # Store in this class the args to pass at the generator | ||||
9 | class FakeArgs: | ||||
10 | pass | ||||
11 | |||||
12 | class XProtoTestHelpers: | ||||
13 | |||||
14 | @staticmethod | ||||
15 | def write_tmp_target(target): | ||||
16 | tmp_file = open(TMP_TARGET_PATH, 'w') | ||||
17 | tmp_file.write(target) | ||||
18 | tmp_file.close() | ||||
19 | return TMP_TARGET_PATH | ||||
20 |