Skip to content

Print debug information for failed testcase. #12

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

Closed
wants to merge 2 commits into from

Conversation

jhshi
Copy link
Contributor

@jhshi jhshi commented May 5, 2017

No description provided.

@chishui
Copy link
Owner

chishui commented May 5, 2017

What's the new look of the submit result message? My last commit has a test case fail, working on it.

@jhshi
Copy link
Contributor Author

jhshi commented May 5, 2017

On failed testcase, the toast message is like this:

image

@chishui
Copy link
Owner

chishui commented May 5, 2017

The test case input or output or stdout data sometimes will be so big that the toast is not able to hold. If it can, I think we need a better format or even a better container to display the whole information rather than just simply put them into the toast.

@jhshi
Copy link
Contributor Author

jhshi commented May 5, 2017

Just consolidated some old commits.

I agree. Sometimes those text can be large. What format do you suggest?

@chishui
Copy link
Owner

chishui commented May 5, 2017

I suggest a well structured urwid view, each section has a fixed size and for oversized contends user can scroll to view the whole content. The view could be a overlay view or we can just append the result view to the bottom of the detail view just like leetcode webpage does.

@jhshi jhshi force-pushed the testcase branch 2 times, most recently from 663cf26 to b799c2e Compare May 6, 2017 03:01
@jhshi
Copy link
Contributor Author

jhshi commented May 6, 2017

As a newbie to urwid, this is as far as I can get. The right way is probably to use Pile to stack the detail and result view, but I can not figure out how to assign the height of the detail view.

image

@jhshi
Copy link
Contributor Author

jhshi commented May 9, 2017

Somehow the test is failing. and upstream/master is failing on my environment as well. Is there a requirements.txt file that helps testing and debuging? Also, does Python version matter? I tried both 2.7.6 (ubuntu 14.04 default) and 2.7.13 (latest), both setup has test fails.

@chishui
Copy link
Owner

chishui commented May 14, 2017

Sorry for delay, I was out for a meeting this whole week. Test depends on two mock library, mock and requests-mock, both for python 2.7. I haven't tried 2.7.6 but my python version is 2.7.13. Please use pip to install these two packages. You could run test by command 'make test', you could refer to Makefile for information of the command.

@jhshi
Copy link
Contributor Author

jhshi commented Aug 29, 2017

Closing since it seems you have a better solution.

@jhshi jhshi closed this Aug 29, 2017
@jhshi jhshi deleted the testcase branch August 29, 2017 23:09
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

Successfully merging this pull request may close these issues.

2 participants