Add unit test for Struct_mallinfo2.__str__()

This commit is contained in:
Ryan Dick
2023-10-03 14:24:52 -04:00
parent 763dcacfd3
commit 519b892f0c
2 changed files with 9 additions and 1 deletions

View File

@ -1,6 +1,6 @@
import pytest
from invokeai.backend.model_management.libc_util import LibcUtil
from invokeai.backend.model_management.libc_util import LibcUtil, Struct_mallinfo2
def test_libc_util_mallinfo2():
@ -14,3 +14,10 @@ def test_libc_util_mallinfo2():
info = libc.mallinfo2()
assert info.arena > 0
def test_struct_mallinfo2_to_str():
"""Smoke test of Struct_mallinfo2.__str__()."""
info = Struct_mallinfo2()
info_str = str(info)
print(info_str)