-
Notifications
You must be signed in to change notification settings - Fork 94
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
rewrite _find_sample_tags of AtCoder #619
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
コメントの変更に伴い、
tests/service_atcoder.py
内の
test_from_html_first_format
test_from_html_second_format
test_from_html_third_format
をそれぞれtest_from_html_very_old
test_from_html_old
test_from_html_standard
のように変えて欲しいです。
ところで、今回のPRのようなtestを今まで |
ところで間違えて
|
テストを |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
master
にpushされた内容を確認しましたが、大丈夫だと思います。
先ほど変更を希望した箇所以外は問題がないと思いますので、マージします。
ただ、#618で少し言及したA問題のバグ修正は将来なされるべきと考えています。
より見通しのよいコードに仕上がっていると感じています。ありがとうございました。
テストについてですが、そのような視点があるのですね。たしかにおっしゃるとおりです。
|
https://atcoder.jp/contests/tenka1-2014-quala/tasks/tenka1_2014_qualA_a の |
そうですね。 |
close #618
次をします:
if
elif
elif
の構造から単一の `for の構造へ変更する#618 の原因は
h3+pre.prettyprint
であるのにh3+section pre
のための分岐に食われてしまってh3
のために違う場所を探していたためだったようです。同様の理由で
h3+pre.literal-block
なども (もしあれば) 検出に失敗します。実装ですが、大きく構造を変えるのが楽なのでそうしました。
ついでに
tag_plus
がよくない (無闇にyield
してるのとか外側の変数pre
を読んでるのとか) も修正されました。バグ修正のついでの refactoring はよくないのですが、書き直しが多いので巻き込みました。ところで、単なる
h3+section>pre
を足すと<h3>Sample Output 1</h3><section><pre>13</pre>構成できる文字列は<pre><code>abc</code></pre>や……
で誤検出になります。これは意図的に回避しています。(修正量が大きくて嫌な感じがしますが、元がまずかったのでしかたないやつだと思っています)