ACIL FM
Dark
Refresh
Current DIR:
/opt/alt/python313/lib64/python3.13/test/test_tkinter
/
opt
alt
python313
lib64
python3.13
test
test_tkinter
Upload
Zip Selected
Delete Selected
Pilih semua
Nama
Ukuran
Permission
Aksi
__pycache__
-
chmod
Open
Rename
Delete
README
566 B
chmod
View
DL
Edit
Rename
Delete
support.py
4.06 MB
chmod
View
DL
Edit
Rename
Delete
test_colorchooser.py
2.16 MB
chmod
View
DL
Edit
Rename
Delete
test_font.py
5.84 MB
chmod
View
DL
Edit
Rename
Delete
test_geometry_managers.py
40.22 MB
chmod
View
DL
Edit
Rename
Delete
test_images.py
27.82 MB
chmod
View
DL
Edit
Rename
Delete
test_loadtk.py
1.45 MB
chmod
View
DL
Edit
Rename
Delete
test_messagebox.py
1.1 MB
chmod
View
DL
Edit
Rename
Delete
test_misc.py
47.65 MB
chmod
View
DL
Edit
Rename
Delete
test_simpledialog.py
1014 B
chmod
View
DL
Edit
Rename
Delete
test_text.py
4.72 MB
chmod
View
DL
Edit
Rename
Delete
test_variables.py
10.65 MB
chmod
View
DL
Edit
Rename
Delete
test_widgets.py
59.54 MB
chmod
View
DL
Edit
Rename
Delete
widget_tests.py
22.16 MB
chmod
View
DL
Edit
Rename
Delete
__init__.py
536 B
chmod
View
DL
Edit
Rename
Delete
__main__.py
58 B
chmod
View
DL
Edit
Rename
Delete
Edit file: /opt/alt/python313/lib64/python3.13/test/test_tkinter/test_loadtk.py
import os import sys import unittest import test.support as test_support from test.support import os_helper from tkinter import Tcl, TclError test_support.requires('gui') class TkLoadTest(unittest.TestCase): @unittest.skipIf('DISPLAY' not in os.environ, 'No $DISPLAY set.') def testLoadTk(self): tcl = Tcl() self.assertRaises(TclError,tcl.winfo_geometry) tcl.loadtk() self.assertEqual('1x1+0+0', tcl.winfo_geometry()) tcl.destroy() def testLoadTkFailure(self): old_display = None if sys.platform.startswith(('win', 'darwin', 'cygwin')): # no failure possible on windows? # XXX Maybe on tk older than 8.4.13 it would be possible, # see tkinter.h. return with os_helper.EnvironmentVarGuard() as env: if 'DISPLAY' in os.environ: del env['DISPLAY'] # on some platforms, deleting environment variables # doesn't actually carry through to the process level # because they don't support unsetenv # If that's the case, abort. with os.popen('echo $DISPLAY') as pipe: display = pipe.read().strip() if display: return tcl = Tcl() self.assertRaises(TclError, tcl.winfo_geometry) self.assertRaises(TclError, tcl.loadtk) if __name__ == "__main__": unittest.main()
Simpan
Batal
Isi Zip:
Unzip
Create
Buat Folder
Buat File
Terminal / Execute
Run
Chmod Bulk
All File
All Folder
All File dan Folder
Apply