Browse Source

tests: Ignore DeprecationWarning in OnscreenText tests

rdb 4 năm trước cách đây
mục cha
commit
817f04d19e
1 tập tin đã thay đổi với 7 bổ sung0 xóa
  1. 7 0
      tests/gui/test_OnscreenText.py

+ 7 - 0
tests/gui/test_OnscreenText.py

@@ -1,6 +1,8 @@
 from direct.gui.OnscreenText import OnscreenText
 from direct.gui.OnscreenText import OnscreenText
+import pytest
 
 
 
 
[email protected]("ignore::DeprecationWarning")
 def test_onscreentext_text_pos():
 def test_onscreentext_text_pos():
     text = OnscreenText(pos=(1, 2))
     text = OnscreenText(pos=(1, 2))
     assert text['pos'] == (1, 2)
     assert text['pos'] == (1, 2)
@@ -43,6 +45,7 @@ def test_onscreentext_text_pos():
     assert text.get_pos() == (0, 0, 0)
     assert text.get_pos() == (0, 0, 0)
 
 
 
 
[email protected]("ignore::DeprecationWarning")
 def test_onscreentext_node_pos():
 def test_onscreentext_node_pos():
     text = OnscreenText()
     text = OnscreenText()
 
 
@@ -55,6 +58,7 @@ def test_onscreentext_node_pos():
     assert text.get_pos() == (1, 2, 3)
     assert text.get_pos() == (1, 2, 3)
 
 
 
 
[email protected]("ignore::DeprecationWarning")
 def test_onscreentext_text_roll():
 def test_onscreentext_text_roll():
     text = OnscreenText(roll=1)
     text = OnscreenText(roll=1)
     assert text['roll'] == 1
     assert text['roll'] == 1
@@ -97,6 +101,7 @@ def test_onscreentext_text_roll():
     assert text.get_r() == 0
     assert text.get_r() == 0
 
 
 
 
[email protected]("ignore::DeprecationWarning")
 def test_onscreentext_node_roll():
 def test_onscreentext_node_roll():
     text = OnscreenText()
     text = OnscreenText()
 
 
@@ -109,6 +114,7 @@ def test_onscreentext_node_roll():
     assert text.get_r() == 45
     assert text.get_r() == 45
 
 
 
 
[email protected]("ignore::DeprecationWarning")
 def test_onscreentext_text_scale():
 def test_onscreentext_text_scale():
     text = OnscreenText(scale=(1, 2))
     text = OnscreenText(scale=(1, 2))
     assert text['scale'] == (1, 2)
     assert text['scale'] == (1, 2)
@@ -159,6 +165,7 @@ def test_onscreentext_text_scale():
     assert text.get_scale() == (1, 1, 1)
     assert text.get_scale() == (1, 1, 1)
 
 
 
 
[email protected]("ignore::DeprecationWarning")
 def test_onscreentext_node_scale():
 def test_onscreentext_node_scale():
     text = OnscreenText()
     text = OnscreenText()