Technical mailing list archives

Re: assert_equals in yaml python blocks

Pedro M. Baeza
- 09/23/2014 07:50:13
Can we add "import xxx" in tests, because the dependency is only for test (so to be put on Travis or test machine)?


2014-09-23 13:41 GMT+02:00 Leonardo "LeartS" Donelli <>:
That dependency is necessary only for running the tests though, and I
don't think putting nose in as a python dependency,
when it isn't really required for the module to work, is a good
practice. Or at least it should be highlighted.

Can't you just use YAML !assert blocks and your 3 lines python
equivalent of assert_equals when YAML !assert doesn't work? It's
standard python and not that much longer.

What I'm saying is: Between yaml !assert, yaml !python blocks, and
unittests, I'm no sure the missing assert_equals is enough to justify
adding a "fake" dependency to the module, required only to run tests.

Post to: