Pino Toscano
2016-Jun-10 13:10 UTC
Re: [Libguestfs] [PATCH 2/2] ruby: tests: Give each test class and method a unique name.
In data martedì 7 giugno 2016 22:35:33, Richard W.M. Jones ha scritto:> 'tc_410_close_event.rb' was not being run. You could prove this by > simply inserting "exit 1" into that test. > > The reason is unclear, but by renaming every class and method in the > tests to be unique, this ensures the tests are run. > ---ruby/t/tc_410_close_event.rb: def test_events ruby/t/tc_420_log_messages.rb: def test_events This explains: all the tests have TestLoad as class name, and these two tests have the same method name. IMHO renaming just the class names should be enough, but this patch is fine as well. Thanks, -- Pino Toscano
Richard W.M. Jones
2016-Jun-10 13:24 UTC
Re: [Libguestfs] [PATCH 2/2] ruby: tests: Give each test class and method a unique name.
On Fri, Jun 10, 2016 at 03:10:32PM +0200, Pino Toscano wrote:> In data martedì 7 giugno 2016 22:35:33, Richard W.M. Jones ha scritto: > > 'tc_410_close_event.rb' was not being run. You could prove this by > > simply inserting "exit 1" into that test. > > > > The reason is unclear, but by renaming every class and method in the > > tests to be unique, this ensures the tests are run. > > --- > > ruby/t/tc_410_close_event.rb: def test_events > ruby/t/tc_420_log_messages.rb: def test_events > > This explains: all the tests have TestLoad as class name, and these two > tests have the same method name. IMHO renaming just the class names > should be enough,I tried renaming just the methods, but that didn't seem to be sufficient to make the tests all run reliably, hence renaming the classes as well. (Not helped by the lack of coherent documentation ...)> but this patch is fine as well.Thanks - I will push this. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 100 libraries supported. http://fedoraproject.org/wiki/MinGW
Richard W.M. Jones
2016-Jun-10 13:28 UTC
Re: [Libguestfs] [PATCH 2/2] ruby: tests: Give each test class and method a unique name.
On Fri, Jun 10, 2016 at 02:24:54PM +0100, Richard W.M. Jones wrote:> On Fri, Jun 10, 2016 at 03:10:32PM +0200, Pino Toscano wrote: > > In data martedì 7 giugno 2016 22:35:33, Richard W.M. Jones ha scritto: > > > 'tc_410_close_event.rb' was not being run. You could prove this by > > > simply inserting "exit 1" into that test. > > > > > > The reason is unclear, but by renaming every class and method in the > > > tests to be unique, this ensures the tests are run. > > > --- > > > > ruby/t/tc_410_close_event.rb: def test_events > > ruby/t/tc_420_log_messages.rb: def test_events > > > > This explains: all the tests have TestLoad as class name, and these two > > tests have the same method name. IMHO renaming just the class names > > should be enough, > > I tried renaming just the methods, but that didn't seem to be > sufficient to make the tests all run reliably, hence renaming > the classes as well.Sorry, I misunderstood. Yes, renaming the classes only is likely to be sufficient. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org
Maybe Matching Threads
- Re: [PATCH 2/2] ruby: tests: Give each test class and method a unique name.
- [PATCH 2/2] ruby: tests: Give each test class and method a unique name.
- [PATCH] ruby: Fix .new method (RHBZ#1046509).
- [PATCH 2/2] ruby: tests: use more asserts instead of manual checks
- [PATCH 1/2] ruby: Print exceptions thrown by event callbacks.