Staging
v0.8.1
Revision 64db5aac6be73b14396bcde1648997e208b5a8da authored by Miss Islington (bot) on 15 August 2019, 16:38:22 UTC, committed by GitHub on 15 August 2019, 16:38:22 UTC

Without indendation, seems like strcpy line is parallel to `if` condition.
(cherry picked from commit 69f37bcb28d7cd78255828029f895958b5baf6ff)

Co-authored-by: Hansraj Das <raj.das.136@gmail.com>
1 parent f781283
Raw File
test_ttk_guionly.py
import unittest
from test import support

# Skip this test if _tkinter wasn't built.
support.import_module('_tkinter')

# Skip test if tk cannot be initialized.
support.requires('gui')

import tkinter
from _tkinter import TclError
from tkinter import ttk
from tkinter.test import runtktests

root = None
try:
    root = tkinter.Tk()
    button = ttk.Button(root)
    button.destroy()
    del button
except TclError as msg:
    # assuming ttk is not available
    raise unittest.SkipTest("ttk not available: %s" % msg)
finally:
    if root is not None:
        root.destroy()
    del root

def test_main():
    support.run_unittest(
            *runtktests.get_tests(text=False, packages=['test_ttk']))

if __name__ == '__main__':
    test_main()
back to top