🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
# 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