mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
Get test to work when run from regrtest (add test_main), remove all CRs (^M)s
This commit is contained in:
parent
e2b4b32025
commit
63dfece675
1 changed files with 6 additions and 4 deletions
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
import os
|
import os
|
||||||
|
from test import test_support
|
||||||
from Tkinter import Tcl
|
from Tkinter import Tcl
|
||||||
from _tkinter import TclError
|
from _tkinter import TclError
|
||||||
|
|
||||||
|
|
@ -152,8 +153,9 @@ class TclTest(unittest.TestCase):
|
||||||
finally:
|
finally:
|
||||||
if old_display is not None:
|
if old_display is not None:
|
||||||
os.environ['DISPLAY'] = old_display
|
os.environ['DISPLAY'] = old_display
|
||||||
|
|
||||||
|
def test_main():
|
||||||
|
test_support.run_unittest(TclTest)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
unittest.main()
|
test_main()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue