Skip to content

Commit 6d7f265

Browse files
committed
verify_distribution: Stop setting TERMINFO_DIRS and TCL_LIBRARY
In #215 we started setting the standard terminfo directories by default and in #421 we taught Tcl to find its own install directory without setting environment variables. Stop setting these environment variables in tests to more closely match how users will use our builds.
1 parent 7797c38 commit 6d7f265

File tree

1 file changed

+1
-32
lines changed

1 file changed

+1
-32
lines changed

src/verify_distribution.py

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -6,36 +6,6 @@
66
import sys
77
import unittest
88

9-
TERMINFO_DIRS = [
10-
"/etc/terminfo",
11-
"/lib/terminfo",
12-
"/usr/share/terminfo",
13-
]
14-
15-
TCL_PATHS = [
16-
# POSIX
17-
("lib", "tcl", "tcl"),
18-
# Windows.
19-
("tcl",),
20-
]
21-
22-
HERE = os.path.dirname(sys.executable)
23-
INSTALL_ROOT = os.path.dirname(HERE)
24-
25-
# Need to set TCL_LIBRARY so local tcl/tk files get picked up.
26-
for parts in TCL_PATHS:
27-
candidate = os.path.join(INSTALL_ROOT, *parts)
28-
29-
if os.path.exists(candidate):
30-
os.environ["TCL_LIBRARY"] = candidate
31-
break
32-
33-
# Need to set TERMINFO_DIRS so terminfo database can be located.
34-
if "TERMINFO_DIRS" not in os.environ:
35-
terminfo_dirs = [p for p in TERMINFO_DIRS if os.path.exists(p)]
36-
if terminfo_dirs:
37-
os.environ["TERMINFO_DIRS"] = ":".join(terminfo_dirs)
38-
399

4010
class TestPythonInterpreter(unittest.TestCase):
4111
def test_compression(self):
@@ -68,7 +38,7 @@ def error_handler(fif, message):
6838
def test_curses_import(self):
6939
import curses
7040

71-
assert curses is not None
41+
self.assertIsNotNone(curses)
7242

7343
@unittest.skipIf(os.name == "nt", "curses not available on Windows")
7444
@unittest.skipIf("TERM" not in os.environ, "TERM not set")
@@ -165,7 +135,6 @@ def test_gil_disabled(self):
165135

166136
self.assertEqual(sysconfig.get_config_var("Py_GIL_DISABLED"), wanted)
167137

168-
@unittest.skipIf("TCL_LIBRARY" not in os.environ, "TCL_LIBRARY not set")
169138
@unittest.skipIf("DISPLAY" not in os.environ, "DISPLAY not set")
170139
def test_tkinter(self):
171140
import tkinter as tk

0 commit comments

Comments
 (0)