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

snipped side by side if output is long. #675

Merged
merged 10 commits into from
Feb 14, 2020

Conversation

fukatani
Copy link
Contributor

Resolve #674
test

@@ -137,7 +138,10 @@ def print_input():
log.emit('output:\n%s', utils.snip_large_file_content(answer.encode(), limit=40, head=20, tail=10, bold=True))
log.emit('expected:\n%s', utils.snip_large_file_content(expected.encode(), limit=40, head=20, tail=10, bold=True))
elif mode == "side-by-side":
display_side_by_side_color(answer, expected)
if max(answer.count("\n"), expected.count("\n")) <= 40:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

私は40がちょうどよいと思います:+1:

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

simpleがlimit40なんですけど、あっちは縦に詰んでるからside-by-sideは80行でも許されるのかなと思いつつ、開いているターミナルが50行程度だったので、40としました。

@fukatani fukatani force-pushed the sxsdiff2 branch 2 times, most recently from fa9e21f to 796658d Compare February 13, 2020 13:30
@fukatani
Copy link
Contributor Author

これマージされたらリリースします。

@fukatani fukatani changed the title [WIP] snipped side by side if output is long. snipped side by side if output is long. Feb 13, 2020
@fukatani fukatani mentioned this pull request Feb 13, 2020
@kawacchu
Copy link
Contributor

kawacchu commented Feb 13, 2020

AppVeyorで落ちていますね...
GNU timeはWindows環境に無いような気がします。

Travis CIではパスしていますしlogひとつ分の差なので、@unittest.skipIf(os.name == 'nt')でtestごとskipしてしまっても良い気がします。

@fukatani
Copy link
Contributor Author

timeがWindowsにないため、WindowsはLinuxのログ出力と異なり、エラーが出ていました。
ひとまず、Windowsではテストをスキップします。

Copy link
Contributor

@kawacchu kawacchu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me!

@kawacchu kawacchu merged commit a944741 into online-judge-tools:master Feb 14, 2020
@fukatani fukatani deleted the sxsdiff2 branch February 15, 2020 05:32
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.

snipping side-by-side diff display
2 participants