Skip to content

Commit c9e6c91

Browse files
author
Alan Christie
committed
- Adds a couple of new tests
- Logs PYTHONPATH
1 parent 62ca12b commit c9e6c91

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

src/groovy/Tester.groovy

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ class Tester {
110110
boolean run() {
111111

112112
// Log supported test file versions
113-
Log.info('Setup', "Supporting test file versions: $supportedTestFileVersions")
113+
Log.info('Tests', "Supporting test file versions: $supportedTestFileVersions")
114+
Log.info('PYTHONPATH', System.getenv('PYTHONPATH'))
114115
Log.info('Stop on error', stopOnError)
115116

116117
// Before we start - cleanup (everything)

src/python/test/pipelines_utils/test_parameter_utils.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,25 @@ def test_expand_parameters(self):
4141
params_b = ([2, 2, 2], 'b')
4242
result = parameter_utils.expandParameters(params_a, params_b)
4343
self.assertEquals(([1, 1, 1], [2, 2, 2]), result)
44+
45+
def test_expand_parameters_when_unnecessary(self):
46+
"""Verifies expansion of multiple parameters when no expansion is needed.
47+
"""
48+
params_a = ([1, 1, 1], 'a')
49+
params_b = ([2, 2, 2], 'b')
50+
result = parameter_utils.expandParameters(params_a, params_b)
51+
self.assertEquals(([1, 1, 1], [2, 2, 2]), result)
52+
53+
def test_expand_parameters_with_real_data(self):
54+
"""Verifies expansion of multiple parameters with some actual values.
55+
"""
56+
t1 = ([0.135, 0.675, 1.35], 't1')
57+
t2 = ([0.135, 0.675, 1.35], 't2')
58+
t3 = ([12.0, 12.0, 12.0], 't3')
59+
t4 = ([0.5, 0.5, 0.5], 't4')
60+
t5 = ([7.49, 8.7, 8.7], 't5')
61+
t6 = ([0.347, 0.17, 0.17], 't6')
62+
t7 = ([0.29, 0.23, 0.23], 't7') # t_hf_a ([0.5, 0.5, 0.5], 'halflives_abs'
63+
a, b, c, d, e, f, g = parameter_utils.expandParameters(t1, t2, t3, t4, t5, t6, t7)
64+
self.assertEquals([0.135, 0.675, 1.35], a)
65+
self.assertEquals([0.29, 0.23, 0.23], g)

0 commit comments

Comments
 (0)