Files
galaxy/test/functional/tools
Nicola Soranzo ff0d28c35c Fix unicode_stream framework tests on Docker
This fixes the following traceback:
```
( unicode_stream ) > Test-1 ... galaxy.tools DEBUG 2018-08-21 09:40:59,052 Validated and populated state for tool request (0.098 ms)
galaxy.tools.actions INFO 2018-08-21 09:40:59,076 Handled output named out_file1 for tool unicode_stream (1.337 ms)
galaxy.tools.actions INFO 2018-08-21 09:40:59,080 Added output datasets to history (4.399 ms)
galaxy.tools.actions INFO 2018-08-21 09:40:59,084 Verified access to datasets for Job[unflushed,tool_id=unicode_stream] (0.058 ms)
galaxy.tools.actions INFO 2018-08-21 09:40:59,086 Setup for job Job[unflushed,tool_id=unicode_stream] complete, ready to flush (5.220 ms)
galaxy.tools.actions INFO 2018-08-21 09:40:59,127 Flushed transaction for job Job[id=354,tool_id=unicode_stream] (40.627 ms)
galaxy.tools.execute DEBUG 2018-08-21 09:40:59,127 Tool [unicode_stream] created job [354] (56.506 ms)
galaxy.tools.execute DEBUG 2018-08-21 09:40:59,132 Executed 1 job(s) for tool unicode_stream request: (79.434 ms)
galaxy.jobs.mapper DEBUG 2018-08-21 09:40:59,556 (354) Mapped job to destination id: local
galaxy.jobs.handler DEBUG 2018-08-21 09:40:59,561 (354) Dispatching to local runner
galaxy.jobs DEBUG 2018-08-21 09:40:59,571 (354) Working directory for job is: /tmp/tmp3drfmr6x/tmp_ywd33ar/tmpbzo4a1d9/database/job_working_directory_azry9a1y/000/354
galaxy.jobs DEBUG 2018-08-21 09:40:59,574 (354) Persisting job destination (destination id: local)
galaxy.jobs.runners DEBUG 2018-08-21 09:40:59,589 Job [354] queued (27.361 ms)
galaxy.jobs.handler INFO 2018-08-21 09:40:59,604 (354) Job dispatched
galaxy.jobs.runners ERROR 2018-08-21 09:40:59,715 (354) Failure preparing job
Traceback (most recent call last):
  File "/galaxy/lib/galaxy/jobs/runners/__init__.py", line 187, in prepare_job
    job_wrapper.prepare()
  File "/galaxy/lib/galaxy/jobs/__init__.py", line 874, in prepare
    self.command_line, self.extra_filenames, self.environment_variables = tool_evaluator.build()
  File "/galaxy/lib/galaxy/tools/evaluation.py", line 435, in build
    raise e
  File "/galaxy/lib/galaxy/tools/evaluation.py", line 431, in build
    self.__build_config_files()
  File "/galaxy/lib/galaxy/tools/evaluation.py", line 504, in __build_config_files
    self.__write_workdir_file(config_filename, config_text, param_dict, is_template=is_template)
  File "/galaxy/lib/galaxy/tools/evaluation.py", line 578, in __write_workdir_file
    f.write(value)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-5: ordinal not in range(128)
galaxy.tools.error_reports DEBUG 2018-08-21 09:40:59,869 Bug report plugin <galaxy.tools.error_reports.plugins.sentry.SentryPlugin object at 0x7f92efb81668> generated response None
FAIL
```

which is due to the fact that the default encoding in the Docker image
is `ANSI_X3.4-1968`.

Also update `unicode_stream` test tool to IUC best practices.
2018-08-21 16:04:27 +01:00
..
2017-11-24 15:25:19 -05:00
2016-09-08 11:40:01 -04:00
2014-12-05 20:36:48 -05:00
2015-03-23 20:04:49 -04:00
2015-03-15 09:53:05 -04:00

This directory contains tools only useful for testing and
demonstrating aspects of the tool syntax. Run the test driver script
'run_tests.sh' with the '-framework' as first argument to run through
these tests. Pass in an '-id' along with one of these tool ids to test
a single tool.

Some API tests use these tools to test various features of the API,
tool, and workflow subsystems. Pass the argument
'-with_framework_test_tools' to 'run_tests.sh' in addition to '-api'
to ensure these tools get loaded during the testing process.

Finally, to play around with these tools interactively - simply
replace the 'galaxy.ini' option 'tool_config_file' with:

tool_config_file = test/functional/tools/samples_tool_conf.xml