8000 Fix old test cases to comply with GH issue number range · python/core-workflow@724fefb · GitHub
[go: up one dir, main page]

Skip to content

Commit 724fefb

Browse files
committed
Fix old test cases to comply with GH issue number range
1 parent f864c05 commit 724fefb

10 files changed

+15
-13
lines changed

blurb/blurb.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,9 @@ def finish_entry():
486486
# we'll complain about the *first* error
487487
# we see in the blurb file, which is a
488488
# better user experience.
489+
if key == "gh-issue" and int(value) < 32426:
490+
throw("The gh-issue number should be 32426 or above.")
491+
489492
if key in issue_keys:
490493
try:
491494
int(value)
@@ -959,11 +962,6 @@ def init_tmp_with_template():
959962
assert len(blurb) # if parse_blurb succeeds, we should always have a body
960963
if len(blurb) > 1:
961964
failure = "Too many entries! Don't specify '..' on a line by itself."
962-
gh_issue_number = blurb[0][0]["gh-issue"]
963-
if not gh_issue_number.isdigit():
964-
failure = "The gh-issue number must be a number."
965-
if int(gh_issue_number) < 32426:
966-
failure = "The gh-issue number should be 32426 or above."
967965

968966
if failure:
969967
print()

blurb/tests/fail/small-gh-number.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.. gh-issue: 100
2+
.. section: Library
3+
4+
This is an invalid blurb. GitHub issues should be 32426 or above.

blurb/tests/pass/basic.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.. date: 2017-05-02
2-
.. gh-issue: 0
2+
.. gh-issue: 40000
33
.. nonce: xyz
44
.. section: Library
55

blurb/tests/pass/basic.rst.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.. date: 2017-05-02
2-
.. gh-issue: 0
2+
.. gh-issue: 40000
33
.. nonce: xyz
44
.. section: Library
55

blurb/tests/pass/case-insensitive.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.. date: 2017-05-02
2-
.. GH-Issue: 0
2+
.. GH-Issue: 35000
33
.. nonce: xyz
44
.. section: Library
55

blurb/tests/pass/case-insensitive.rst.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.. date: 2017-05-02
2-
.. gh-issue: 0
2+
.. gh-issue: 35000
33
.. nonce: xyz
44
.. section: Library
55

blurb/tests/pass/no-break-long-words.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.. date: 1234
2-
.. gh-issue: 0
2+
.. gh-issue: 35000
33
.. nonce: xyz
44
.. section: Library
55

blurb/tests/pass/no-break-long-words.rst.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.. date: 1234
2-
.. gh-issue: 0
2+
.. gh-issue: 35000
33
.. nonce: xyz
44
.. section: Library
55

blurb/tests/pass/no-break-on-hyphens.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.. date: 7333
2-
.. gh-issue: 21121
2+
.. gh-issue: 41121
33
.. nonce: ZLsRil
44
.. section: Library
55

blurb/tests/pass/no-break-on-hyphens.rst.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.. date: 7333
2-
.. gh-issue: 21121
2+
.. gh-issue: 41121
33
.. nonce: ZLsRil
44
.. section: Library
55

0 commit comments

Comments
 (0)
0