Skip to content

bpo-36528: Remove duplicate tests#12689

Merged
benjaminp merged 2 commits intopython:masterfrom
tirkarthi:bpo36528
Sep 11, 2019
Merged

bpo-36528: Remove duplicate tests#12689
benjaminp merged 2 commits intopython:masterfrom
tirkarthi:bpo36528

Conversation

@tirkarthi
Copy link
Copy Markdown
Member

@tirkarthi tirkarthi commented Apr 4, 2019

105 tests that were duplicates were removed. cc : @MakDon

https://bugs.python.org/issue36528

@MakDon
Copy link
Copy Markdown
Contributor

MakDon commented May 31, 2019

Hi, it has been 24 days since the last commit. If there‘s something i could do for this PR, i am glad to help.

@tirkarthi
Copy link
Copy Markdown
Member Author

This might require some manual work to see if I didn't remove any test that was not a duplicate. Since there is beta cycle going on I would consider this to be a low priority and hope someone gets to it later. Thanks for looking into this though.

@MakDon
Copy link
Copy Markdown
Contributor

MakDon commented Jun 4, 2019

Hi, i checked it manually and i made the note below when i was checking.
I confirm that you didn't remove any test that was not a duplicate, but i am not sure if there's any duplicate left.

91 - 606
276 - 75
277 - 76
278 - 77
116 to 125 - 282 to 291
126 to 128 - 293 to 295
129 - 297
130 - 302
131 - 303
132 - 305
133 - 306
134 to 138 - 308 to 312
141 to 150 - 315 to 324
154 - 327
155 - 328
159 - 329
160 - 330
162 to 167 - 331 to 336
187 to 189- 337 to 339

190 - 342
156 - 343
191 to 194 - 344 to 347
157 to 158 - 348 to 349
195 to 197 - 350 to 352
198 - 356
199 - 358
200 - 360
201 to 204 - 362 to 365
205 to 211 - 368 to 374

213 to 230 - 376 to 393
231 to 239 - 401 to 409

240 - 549
105 - 591
109 - 592

and i found a special test case:
212 ('^(ab|cd)e', 'abcde', FAIL, 'xg1y', 'xy'),
375 ('^(ab|cd)e', 'abcde', FAIL),

According to the comment in re_test.py(line 41), the 'xg1y' and 'xy' means:
3: a string that will be eval()'ed to produce a test string.
This is an arbitrary Python expression; the available
variables are "found" (the whole match), and "g1", "g2", ...
up to "g99" contain the contents of each group, or the
string 'None' if the group wasn't given a value, or the
string 'Error' if the group index was out of range;
also "groups", the return value of m.group() (a tuple).
4: The expected result of evaluating the expression.
If the two don't match, an error is reported.

But i counld not figure out how it work with a 'xg1y' becasue the other test cases' 3th elements are just like 'found' or 'found+"-"+g1+"-"+g2'.

I hope the work i do helps.

Comment thread Lib/test/re_tests.py Outdated
Co-Authored-By: Makdon <makdon@makdon.me>
@tirkarthi
Copy link
Copy Markdown
Member Author

@MakDon Thank you for the review. I have added your suggestion to remove the comment since test was removed.

@miss-islington
Copy link
Copy Markdown
Contributor

Thanks @tirkarthi for the PR, and @benjaminp for merging it 🌮🎉.. I'm working now to backport this PR to: 3.8.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants