Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

autonose fails on skipped test #22

Open
vestel opened this issue Feb 6, 2012 · 11 comments
Open

autonose fails on skipped test #22

vestel opened this issue Feb 6, 2012 · 11 comments

Comments

@vestel
Copy link

vestel commented Feb 6, 2012

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")
@timbertson
Copy link
Owner

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

@vestel
Copy link
Author

vestel commented Mar 12, 2012

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

@timbertson
Copy link
Owner

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.

@vestel
Copy link
Author

vestel commented Mar 14, 2012

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

@vestel
Copy link
Author

vestel commented Mar 15, 2012

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

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

@timbertson
Copy link
Owner

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
Copy link
Owner

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

@vestel
Copy link
Author

vestel commented Mar 20, 2012

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

@timbertson timbertson reopened this Mar 20, 2012
@timbertson
Copy link
Owner

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

@vestel
Copy link
Author

vestel commented Mar 20, 2012

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>,)

@timbertson
Copy link
Owner

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants