From da820877357e5242850487b90bc96f7caf214048 Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 28 Oct 2018 11:45:14 +0100 Subject: [PATCH] tests: add unit test for TextNode::write, see #431 --- tests/text/test_textnode.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/text/test_textnode.py b/tests/text/test_textnode.py index e96c9e5371..bedc91b0da 100644 --- a/tests/text/test_textnode.py +++ b/tests/text/test_textnode.py @@ -1,6 +1,13 @@ from panda3d import core +def test_textnode_write(): + out = core.StringStream() + text = core.TextNode("test") + text.write(out, 0) + assert out.data.startswith(b"TextNode test") + + def test_textnode_card_as_margin(): text = core.TextNode("test") text.text = "Test"