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

hospital-serve output explains exception traceback #72

Open
benoitbryon opened this issue May 29, 2014 · 1 comment
Open

hospital-serve output explains exception traceback #72

benoitbryon opened this issue May 29, 2014 · 1 comment
Labels

Comments

@benoitbryon
Copy link
Member

Current example:

{
    "status": "fail",
    "details": [
        {
            "test": "test_false (foo.bar)",
            "status": "fail",
            "context": "(<type 'exceptions.AssertionError'>, AssertionError(\"Failed to fetch URL http://localhost:8000/.\\nException was: HTTPConnectionPool(host='localhost', port=8000): Max retries exceeded with url: / (Caused by <class 'socket.error'>: [Errno 111] Connection refused)\",), <traceback object at 0x7f34ac5bde18>)"
        }
    ],
    "summary": {
        "skip": 0,
        "pass": 0,
        "expected_failure": 0,
        "error": 0,
        "fail": 1,
        "total": 1,
        "unexpected_success": 0
    }
}

Some of the values in "context" are not readable. As an example the <traceback object at 0x7f34ac5bde18> could be explained => it would make it easier to figure out what's wrong, especially when the assertion message is not explicit enough.

@benoitbryon
Copy link
Member Author

Note: using an explicit assertion error message should be the best practice.

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

No branches or pull requests

1 participant