[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Help for Python mock test suite needed



On Mon, Aug 15, 2016 at 05:00:52AM +1000, Ben Finney wrote:
> > https://paste.debian.net/789238/
> 
> That appears to be a simple failure when the test suite is run. The
> assertions, as reported, are in the ‘test_srst2’ module:
> 
> =====
> […]
>   File "test_srst2.py", line 213, in test_run_bowtie_with_defaults
>     run_mock.assert_called_once_with(expected_bowtie2_command)
>   File "/usr/lib/python2.7/dist-packages/mock/mock.py", line 947, in assert_called_once_with
>     raise AssertionError(msg)
> AssertionError: Expected 'run_command' to be called once. Called 0 times.
> 
> […]
> 
>   File "test_srst2.py", line 180, in test_run_bowtie_with_overide
>     run_mock.assert_called_once_with(expected_bowtie2_command)
>   File "/usr/lib/python2.7/dist-packages/mock/mock.py", line 947, in assert_called_once_with
>     raise AssertionError(msg)
> AssertionError: Expected 'run_command' to be called once. Called 0 times.
> =====
> 
> The tracebacks tell you what test case functions are emitting failures:
> 
>   File "test_srst2.py", line 213, in test_run_bowtie_with_defaults
>   File "test_srst2.py", line 180, in test_run_bowtie_with_overide
> 
> Within those test case functions you can see the exact command that was
> expected to be run. The assertion is that ‘srst2.run_command’ is
> expected to be called (with specific arguments), but is not called,
> hence the assertion fails.

Yes, this is what I guessed from the log.  However, how can I find out
why exactly the command is not called?

Kind regards

      Andreas.

-- 
http://fam-tille.de


Reply to: