Browse Source

tests: add unit test for TextNode::write, see #431

rdb 7 years ago
parent
commit
da82087735
1 changed files with 7 additions and 0 deletions
  1. 7 0
      tests/text/test_textnode.py

+ 7 - 0
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"