ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
# pywinauto.tests.truncation[¶](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.tests.truncation.html#pywinauto-tests-truncation "Permalink to this headline") > Truncation Test > > **What is checked** Checks for controls where the text does not fit in the space provided by the control. > > **How is it checked** There is a function in windows (DrawText) that allows us to find the size that certain text will need. We use this function with correct fonts and other relevant information for the control to be as accurate as possible. > > **When is a bug reported** When the calculated required size for the text is greater than the size of the space available for displaying the text. > > **Bug Extra Information** The bug contains the following extra information Name Description Strings The list of the truncated strings as explained above StringIndices The list of indices (0 based) that are truncated. This will often just be 0 but if there are many strings in the control untranslated it will report ALL the strings e.g. 0,2,5,19,23 > > **Is Reference dialog needed** The reference dialog does not need to be available. If it is available then for each bug discovered it is checked to see if it is a problem in the reference dialog. > > **False positive bug reports** Certain controls do not display the text that is the title of the control, if this is not handled in a standard manner by the software then DLGCheck will report that the string is truncated. > > **Test Identifier** The identifier for this test/bug is “Truncation” > > `pywinauto.tests.truncation.``TruncationTest`(*windows*)[¶](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.tests.truncation.html#pywinauto.tests.truncation.TruncationTest "Permalink to this definition") > > Actually do the test