[proposal] Test::Unit name of failing method

Discussion in 'Ruby' started by Simon Strandgaard, Nov 3, 2003.

  1. I have some code which sometimes goes into endless recursion,
    so that I have to do CTRL-C to stop it.

    The call-stack is very deep, and Test::Unit is only revealing
    the top and the bottom of the call-stack (the middle is shown as
    [...] dots). The method name is within that part which Test::Unit
    hides for me, Thus I cannot determine the name of the failing-method.

    It would be really nice if Test::Unit could determine the name
    of the failing method.

    Any thoughts ?

    --
    Simon Strandgaard, Ruby-1.8.1preview2


    server> ruby test_scanner2.rb
    Loaded suite TestScanner2
    Started
    ....................^C./scanner2.rb:234:in `visit_repeat': Interrupt from ./scanner2.rb:225:in `loop'
    from ./scanner2.rb:252:in `visit_repeat'
    from ./scanner2.rb:31:in `accept'
    from ./scanner2.rb:275:in `visit_group_open'
    from ./scanner2.rb:56:in `accept'
    from ./scanner2.rb:245:in `visit_repeat'
    from ./scanner2.rb:225:in `loop'
    from ./scanner2.rb:252:in `visit_repeat'
    ... 13 levels...
    from /home/neoneye/stow/ruby/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:77:in `start_mediator'
    from /home/neoneye/stow/ruby/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:51:in `start'
    from /home/neoneye/stow/ruby/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:26:in `run'
    from test_scanner2.rb:148
    server>
    Simon Strandgaard, Nov 3, 2003
    #1
    1. Advertising

  2. On Mon, 03 Nov 2003 22:01:05 +0100, Simon Strandgaard wrote:
    [snip]
    > It would be really nice if Test::Unit could determine the name
    > of the failing method.
    >
    > server> ruby test_scanner2.rb
    > Loaded suite TestScanner2
    > Started
    > ...................^C./scanner2.rb:234:in `visit_repeat': Interrupt from ./scanner2.rb:225:in `loop'
    > from ./scanner2.rb:252:in `visit_repeat'
    > from ./scanner2.rb:31:in `accept'
    > from ./scanner2.rb:275:in `visit_group_open'
    > from ./scanner2.rb:56:in `accept'
    > from ./scanner2.rb:245:in `visit_repeat'
    > from ./scanner2.rb:225:in `loop'
    > from ./scanner2.rb:252:in `visit_repeat'
    > ... 13 levels...
    > from /home/neoneye/stow/ruby/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:77:in `start_mediator'
    > from /home/neoneye/stow/ruby/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:51:in `start'
    > from /home/neoneye/stow/ruby/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:26:in `run'
    > from test_scanner2.rb:148
    > server>


    No response.. Apparently its only me which has this kinds of wishes ?
    Or perhaps messages on comp.lang.ruby never reaches ruby-talk ?

    Author of Test::Unit (Nathaniel Talbott) are you reading this ?

    I guess its possible, but I have no idea how to do it.
    any ideas on how to implement this stuff, is appreciated ?

    --
    Simon Strandgaard
    Simon Strandgaard, Nov 5, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Edvard Majakari
    Replies:
    4
    Views:
    674
    Edvard Majakari
    Feb 25, 2005
  2. lblake

    Unit test failing please help

    lblake, Aug 26, 2011, in forum: Python
    Replies:
    2
    Views:
    140
    John Gordon
    Aug 26, 2011
  3. Robert Klemme

    Method test::unit::TestSuite#<<(test)

    Robert Klemme, Aug 6, 2003, in forum: Ruby
    Replies:
    0
    Views:
    97
    Robert Klemme
    Aug 6, 2003
  4. Johan Holmberg
    Replies:
    7
    Views:
    158
    Johan Holmberg
    Sep 15, 2003
  5. timr
    Replies:
    2
    Views:
    154
Loading...

Share This Page