diff test/test_demo.py @ 7586:859c57bc8d91

test: limit search for \r to first 100 bytes. Don't scan entire file. just look at 100 bytes which should include all of the first line.
author John Rouillard <rouilj@ieee.org>
date Mon, 24 Jul 2023 21:24:07 -0400
parents 227aca44fea5
children 5b1163dca9e1
line wrap: on
line diff
--- a/test/test_demo.py	Mon Jul 24 21:16:41 2023 -0400
+++ b/test/test_demo.py	Mon Jul 24 21:24:07 2023 -0400
@@ -54,7 +54,7 @@
 
         try:
             # handle text files with \r\n line endings
-            config_lines.index("\r")
+            config_lines.index("\r", 0, 100)
             config_lines = config_lines.replace("\r\n", "\n")
         except ValueError:
             pass
@@ -99,7 +99,7 @@
 
         try:
             # handle text files with \r\n line endings
-            config_lines.index("\r")
+            config_lines.index("\r", 0, 100)
             config_lines = config_lines.replace("\r\n", "\n")
         except ValueError:
             pass

Roundup Issue Tracker: http://roundup-tracker.org/