autonose icon indicating copy to clipboard operation
autonose copied to clipboard

autonose fails on skipped test

Open vestel opened this issue 13 years ago • 11 comments

If I try to call skipTest("Some comment") inside my test function, autonose launched from 0launch (and which has UI) crashes. autonose launched from 0launch with --console key exits upon execution. Console version of autonose build from a git trunk works (launched via 'autonose' command).

Ubuntu 11.10, python 2.7.2

Testcase attached

import unittest


class TestAutonoseFail(unittest.TestCase):
    def test_crash(self):
        self.skipTest("This test should be skipped")

vestel avatar Feb 06 '12 15:02 vestel

Hmm... While attempting to reproduce this, it went away. As in, I got it a few times, then adding a few debugging steps made it stop breaking for no apparent reason. Taking the debugging statements out, it kept working.

Could you try this out now and see if you're still getting the error? If so, please send me (via gist or just a comment here):

  • the output of 0launch --get-selections autonose-local.xml
  • the stacktrace you get from running with --console

timbertson avatar Mar 11 '12 06:03 timbertson

Testfile:

import unittest
class TestAutonoseFail(unittest.TestCase):
    def test_crash(self):
        self.skipTest("This test should be skipped")
   def test_fail(self):
        self.fail("Should fail")

0launch http://gfxmonk.net/dist/0install/autonose.xml --console

SF
======================================================================
FAIL: test_fail (test.TestAutonoseFail)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tiaburn/YouView/autonose_test/test.py", line 8, in test_fail
    self.fail("Should fail")
AssertionError: Should fail

----------------------------------------------------------------------
Ran 2 tests in 0.008s

FAILED (SKIP=1, failures=1)

0launch --get-selections http://gfxmonk.net/dist/0install/autonose.xml is here https://gist.github.com/2021949

vestel avatar Mar 12 '12 13:03 vestel

I'm not seeing it - the above output looks like autonose is working fine. I ran it and got the same as you, then when I modified the test file it got run again - autonose isn't actually exiting.

When I run it without --console, I get a crash, although right now that seems to be happening for me regardless of whether a test is skipped or not, so that may be another issue.

timbertson avatar Mar 13 '12 09:03 timbertson

My behaviour is exactly opposite: it is working fine with --console. We need 3rd voice I think.

vestel avatar Mar 14 '12 09:03 vestel

I've asked a collegue of mine to launch exactly same case. He did:

  • $ wget https://gist.github.com/gists/2035367/download
  • $ cd into-gist-folder
  • $ 0launch http://gfxmonk.net/dist/0install/autonose.xml

Window collapsed and output in console is https://gist.github.com/2043875

vestel avatar Mar 15 '12 11:03 vestel

I think our behaviour is the same: --console is working for me as well, and the GUI is failing. For me, the GUI is failing for a strange (unrelated) reason, so thanks for the output. I can now see where the problem you're having is.

timbertson avatar Mar 18 '12 06:03 timbertson

Can you please let me know if this works for you? As I mentioned, I'm having GUI troubles so I can't test it myself :(

You can run it locally (after doing a git pull) with:

0launch http://gfxmonk.net/dist/0install/0local.xml autonose.xml && 0launch autonose-local.xml

timbertson avatar Mar 19 '12 11:03 timbertson

I'm bit confused, how should I do that. I've done git pull from autonose repository. Than I've get into autonose local copy and run 0launch http://gfxmonk.net/dist/0install/0local.xml autonose.xml. It created a autonose-local.xml file in same directory. I've navigate to issue_22 folder and execute $ 0launch ../autonose/autonose-local.xml there. Is it correct sequence? If so, UI part is still crashing for me

vestel avatar Mar 20 '12 07:03 vestel

That sounds like you've done the right thing - can you give me a stack trace from when it fails?

Also, just to verify that you have the latest commit, can you send me the output of git show HEAD

timbertson avatar Mar 20 '12 09:03 timbertson

HEAD Output:

tiaburn@lvaltp0692:~/Sources/autonose$ git show HEAD 
commit abc40c500c4074f06089a7e592b8c2399302552c

so it seams, that git pull is correct

tiaburn@lvaltp0692:~/Sources/autonose_22$ 0launch ../autonose/autonose-local.xml 
SF
======================================================================
FAIL: test_fail (test.TestAutonoseFail)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tiaburn/Sources/autonose_22/test.py", line 6, in test_fail
    self.fail("Should fail")
AssertionError: Should fail

----------------------------------------------------------------------
Ran 2 tests in 0.169s

FAILED (SKIP=1, failures=1)
[WARNING] paragram.process.base_process: Unhandled message: (<watcher.TestRun object at 0x18a8390>,)

vestel avatar Mar 20 '12 12:03 vestel

Sorry for taking so long, I don't think I'm going to be able to fix this until I can actually get it running for myself. Unfortunately, that's not likely to happen any time soon, as I don't have much need for it myself lately (and don't really know how to fix the problem I'm getting).

timbertson avatar Mar 27 '12 23:03 timbertson