summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_eof.py
diff options
context:
space:
mode:
authorHugo van Kemenade <1324225+hugovk@users.noreply.github.com>2025-01-21 16:10:08 (GMT)
committerGitHub <noreply@github.com>2025-01-21 16:10:08 (GMT)
commit05d12eecbde1ace39826320cadf8e673d709b229 (patch)
tree2e767c71374e498d1f9759e2ba60177152b396d0 /Lib/test/test_eof.py
parent13475e0a5a317fa61f302f030b0effcb021873d6 (diff)
downloadcpython-05d12eecbde1ace39826320cadf8e673d709b229.zip
cpython-05d12eecbde1ace39826320cadf8e673d709b229.tar.gz
cpython-05d12eecbde1ace39826320cadf8e673d709b229.tar.bz2
gh-127873: Only check `sys.flags.ignore_environment` for `PYTHON*` env vars (#127877)
Diffstat (limited to 'Lib/test/test_eof.py')
-rw-r--r--Lib/test/test_eof.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/test_eof.py b/Lib/test/test_eof.py
index e377383..582e5b6 100644
--- a/Lib/test/test_eof.py
+++ b/Lib/test/test_eof.py
@@ -2,7 +2,7 @@
import sys
from codecs import BOM_UTF8
-from test import support
+from test.support import force_not_colorized
from test.support import os_helper
from test.support import script_helper
from test.support import warnings_helper
@@ -44,6 +44,7 @@ class EOFTestCase(unittest.TestCase):
self.assertEqual(cm.exception.text, "ä = '''thîs is ")
self.assertEqual(cm.exception.offset, 5)
+ @force_not_colorized
def test_EOFS_with_file(self):
expect = ("(<string>, line 1)")
with os_helper.temp_dir() as temp_dir:
@@ -123,6 +124,7 @@ class EOFTestCase(unittest.TestCase):
self.assertEqual(str(cm.exception), expect)
@unittest.skipIf(not sys.executable, "sys.executable required")
+ @force_not_colorized
def test_line_continuation_EOF_from_file_bpo2180(self):
"""Ensure tok_nextc() does not add too many ending newlines."""
with os_helper.temp_dir() as temp_dir: