Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1cccb08

Browse filesBrowse files
authored
test: make check for April 1 resilient across line-breaks (#11006)
* test: make check for April 1 resilient across line-breaks * test: be resilient against faker creating a 63 character long title
1 parent c342bef commit 1cccb08
Copy full SHA for 1cccb08

1 file changed

+4-1Lines changed: 4 additions & 1 deletion

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎ietf/sync/tests_rfcindex.py‎

Copy file name to clipboardExpand all lines: ietf/sync/tests_rfcindex.py
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,10 @@ def test_create_rfc_txt_index(self, mock_save_blob, mock_save_file):
139139
f"{self.april_fools_rfc.rfc_number} {self.april_fools_rfc.title}",
140140
stripped_contents,
141141
)
142-
self.assertIn("1 April 2020", contents) # from the April 1 RFC
142+
# "1 April 2020" may be split across a line wrap (e.g. "1 April\n 2020")
143+
# when the randomly-generated title is long enough to push the date off the line.
144+
# assertRegex handles both wrapped and non-wrapped cases explicitly.
145+
self.assertRegex(contents, r"1\s+April\s+2020") # from the April 1 RFC
143146
self.assertIn(
144147
f"{self.rfc.rfc_number} {self.rfc.title}",
145148
stripped_contents,

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.