Skip to content

Commit 3a957cc

Browse files
author
David Noble
committed
Test bug fixes
1 parent 0cfc5cc commit 3a957cc

File tree

1 file changed

+34
-34
lines changed

1 file changed

+34
-34
lines changed

tests/test_searchcommands_app.py

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -250,9 +250,9 @@ def disable_test_option_logging_configuration(self):
250250
'seed=%s' % TestSearchCommandsApp._seed,
251251
'logging_configuration=logging.conf'],
252252
__GETINFO__=(
253-
os.join('input', '_empty.csv'),
254-
os.join('output', 'test_option_logging_configuration.csv'),
255-
os.join('log', 'test_option_logging_configuration.log')))
253+
os.path.join('input', '_empty.csv'),
254+
os.path.join('output', 'test_option_logging_configuration.csv'),
255+
os.path.join('log', 'test_option_logging_configuration.log')))
256256
return
257257

258258
def disable_test_option_logging_level(self):
@@ -265,9 +265,9 @@ def disable_test_option_logging_level(self):
265265
'seed=%s' % TestSearchCommandsApp._seed,
266266
'logging_level=ERROR'],
267267
__GETINFO__=(
268-
os.join('input', 'population.csv'),
269-
os.join('output', 'test_option_logging_level.csv'),
270-
os.join('log', 'test_option_logging_level.log')))
268+
os.path.join('input', 'population.csv'),
269+
os.path.join('output', 'test_option_logging_level.csv'),
270+
os.path.join('log', 'test_option_logging_level.log')))
271271
return
272272

273273
def disable_test_option_show_configuration(self):
@@ -280,9 +280,9 @@ def disable_test_option_show_configuration(self):
280280
'seed=%s' % TestSearchCommandsApp._seed,
281281
'show_configuration=true'],
282282
__GETINFO__=(
283-
os.join('input', '_empty.csv'),
284-
os.join('output', 'test_option_show_configuration.csv'),
285-
os.join('log', 'test_option_show_configuration.log')))
283+
os.path.join('input', '_empty.csv'),
284+
os.path.join('output', 'test_option_show_configuration.csv'),
285+
os.path.join('log', 'test_option_show_configuration.log')))
286286
return
287287

288288
def test_generating_command_configuration(self):
@@ -298,13 +298,13 @@ def test_generating_command_in_isolation(self):
298298
'rate=200',
299299
'seed=%s' % TestSearchCommandsApp._seed],
300300
__GETINFO__=(
301-
os.join('input', '_empty.csv'),
302-
os.join('output', 'test_generating_command_in_isolation.getinfo.csv'),
303-
os.join('log', 'test_generating_command_in_isolation.log')),
301+
os.path.join('input', '_empty.csv'),
302+
os.path.join('output', 'test_generating_command_in_isolation.getinfo.csv'),
303+
os.path.join('log', 'test_generating_command_in_isolation.log')),
304304
__EXECUTE__=(
305-
os.join('input', '_empty.csv'),
306-
os.join('output', 'test_generating_command_in_isolation.execute.csv'),
307-
os.join('log', 'test_generating_command_in_isolation.log')))
305+
os.path.join('input', '_empty.csv'),
306+
os.path.join('output', 'test_generating_command_in_isolation.execute.csv'),
307+
os.path.join('log', 'test_generating_command_in_isolation.log')))
308308
self._assertCorrectOutputFile('test_generating_command_in_isolation.getinfo.csv')
309309
self._assertCorrectOutputFile('test_generating_command_in_isolation.execute.csv')
310310
return
@@ -326,26 +326,26 @@ def test_reporting_command_in_isolation(self):
326326
'sum', [
327327
'__map__', 'total=subtotal', 'count'],
328328
__GETINFO__=(
329-
os.join('input', 'counts.csv'),
330-
os.join('output', 'test_reporting_command_in_isolation.map.getinfo.csv'),
331-
os.join('log', 'test_reporting_command_in_isolation.log')),
329+
os.path.join('input', 'counts.csv'),
330+
os.path.join('output', 'test_reporting_command_in_isolation.map.getinfo.csv'),
331+
os.path.join('log', 'test_reporting_command_in_isolation.log')),
332332
__EXECUTE__=(
333-
os.join('input', 'counts.csv'),
334-
os.join('output', 'test_reporting_command_in_isolation.map.execute.csv'),
335-
os.join('log', 'test_reporting_command_in_isolation.log')))
333+
os.path.join('input', 'counts.csv'),
334+
os.path.join('output', 'test_reporting_command_in_isolation.map.execute.csv'),
335+
os.path.join('log', 'test_reporting_command_in_isolation.log')))
336336
self._assertCorrectOutputFile('test_reporting_command_in_isolation.map.getinfo.csv')
337337
self._assertCorrectOutputFile('test_reporting_command_in_isolation.map.execute.csv')
338338
self._run(
339339
'sum', [
340340
'total=total', 'count'],
341341
__GETINFO__=(
342-
os.join('input', 'subtotals.csv'),
343-
os.join('output', 'test_reporting_command_in_isolation.reduce.getinfo.csv'),
344-
os.join('log', 'test_reporting_command_in_isolation.log')),
342+
os.path.join('input', 'subtotals.csv'),
343+
os.path.join('output', 'test_reporting_command_in_isolation.reduce.getinfo.csv'),
344+
os.path.join('log', 'test_reporting_command_in_isolation.log')),
345345
__EXECUTE__=(
346-
os.join('input', 'subtotals.csv'),
347-
os.join('output', 'test_reporting_command_in_isolation.reduce.execute.csv'),
348-
os.join('log', 'test_reporting_command_in_isolation.log')))
346+
os.path.join('input', 'subtotals.csv'),
347+
os.path.join('output', 'test_reporting_command_in_isolation.reduce.execute.csv'),
348+
os.path.join('log', 'test_reporting_command_in_isolation.log')))
349349
self._assertCorrectOutputFile('test_reporting_command_in_isolation.reduce.getinfo.csv')
350350
self._assertCorrectOutputFile('test_reporting_command_in_isolation.reduce.execute.csv')
351351
return
@@ -367,13 +367,13 @@ def test_streaming_command_in_isolation(self):
367367
'pattern=\\w+',
368368
'text'],
369369
__GETINFO__=(
370-
os.join('input', 'tweets.csv'),
371-
os.join('output', 'test_streaming_command_in_isolation.getinfo.csv'),
372-
os.join('log', 'test_streaming_command.log')),
370+
os.path.join('input', 'tweets.csv'),
371+
os.path.join('output', 'test_streaming_command_in_isolation.getinfo.csv'),
372+
os.path.join('log', 'test_streaming_command.log')),
373373
__EXECUTE__=(
374-
os.join('input', 'tweets.csv'),
375-
os.join('output', 'test_streaming_command_in_isolation.execute.csv'),
376-
os.join('log', 'test_generating_command_in_isolation.log')))
374+
os.path.join('input', 'tweets.csv'),
375+
os.path.join('output', 'test_streaming_command_in_isolation.execute.csv'),
376+
os.path.join('log', 'test_generating_command_in_isolation.log')))
377377
self._assertCorrectOutputFile('test_streaming_command_in_isolation.getinfo.csv')
378378
self._assertCorrectOutputFile('test_streaming_command_in_isolation.execute.csv')
379379
return
@@ -387,7 +387,7 @@ def test_streaming_command_on_server(self):
387387
def _assertCorrectConfiguration(self, command, test_name):
388388
expected_file_location = os.path.join('_expected_results', test_name + '.txt')
389389
output_file_location = os.path.join('output', test_name + '.csv')
390-
with TestSearchCommandsApp._open_data_file(os.join('input', '_empty.csv'), 'r') as input_file:
390+
with TestSearchCommandsApp._open_data_file(os.path.join('input', '_empty.csv'), 'r') as input_file:
391391
with TestSearchCommandsApp._open_data_file(output_file_location, 'w') as output_file:
392392
command.process(
393393
[command.name, '__GETINFO__', 'fieldname="foo"'],

0 commit comments

Comments
 (0)