Skip to content

Commit

Permalink
Module name should follow optional arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
benmwebb committed Aug 15, 2020
1 parent 7c75379 commit f441169
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion python/saliweb/build/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,9 @@ def builder_python_frontend_tests(target, source, env):
mod += ' --html_coverage=%s' % env['html_coverage']
if env.get('coverage', None):
mod += ' --coverage'
mod += ' --frontend'
mod += " " + env['service_module']
app = env['python'] + " " + mod + " --frontend " \
app = env['python'] + " " + mod + " " \
+ " ".join(str(s) for s in source)
e = env.Clone()
e['ENV']['PYTHONPATH'] = 'frontend'
Expand Down
6 changes: 3 additions & 3 deletions test/build/test_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def test_builder_python_frontend_tests(self):
t = saliweb.build.builder_python_frontend_tests('dummytgt',
['foo.py', 'bar.py'], e)
self.assertEqual(e.env['ENV'], {'PYTHONPATH': 'frontend'})
regex = '.*python .*/run\-tests\.py testser --frontend foo\.py bar\.py$'
regex = '.*python .*/run\-tests\.py --frontend testser foo\.py bar\.py$'
m = re.match(regex, e.exec_str)
self.assertNotEqual(m, None, 'String %s does not match regex %s' \
% (e.exec_str, regex))
Expand All @@ -83,7 +83,7 @@ def test_builder_python_frontend_tests(self):
e.env['coverage'] = 'True'
t = saliweb.build.builder_python_frontend_tests('dummytgt',
['foo.py', 'bar.py'], e)
regex = '.*python .*/run\-tests\.py --coverage testser --frontend ' \
regex = '.*python .*/run\-tests\.py --coverage --frontend testser ' \
+ 'foo\.py bar\.py$'
m = re.match(regex, e.exec_str)
self.assertNotEqual(m, None, 'String %s does not match regex %s' \
Expand All @@ -94,7 +94,7 @@ def test_builder_python_frontend_tests(self):
t = saliweb.build.builder_python_frontend_tests('dummytgt',
['foo.py', 'bar.py'], e)
regex = '.*python .*/run\-tests\.py --html_coverage=testcov ' \
+ 'testser --frontend foo\.py bar\.py$'
+ '--frontend testser foo\.py bar\.py$'
m = re.match(regex, e.exec_str)
self.assertNotEqual(m, None, 'String %s does not match regex %s' \
% (e.exec_str, regex))
Expand Down

0 comments on commit f441169

Please sign in to comment.