From 817f04d19e170a585d1f2a72842a0fa43a6d74f7 Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 9 Mar 2021 19:21:41 +0100 Subject: [PATCH] tests: Ignore DeprecationWarning in OnscreenText tests --- tests/gui/test_OnscreenText.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/gui/test_OnscreenText.py b/tests/gui/test_OnscreenText.py index 2ec74b9f14..04c7950a89 100644 --- a/tests/gui/test_OnscreenText.py +++ b/tests/gui/test_OnscreenText.py @@ -1,6 +1,8 @@ from direct.gui.OnscreenText import OnscreenText +import pytest +@pytest.mark.filterwarnings("ignore::DeprecationWarning") def test_onscreentext_text_pos(): text = OnscreenText(pos=(1, 2)) assert text['pos'] == (1, 2) @@ -43,6 +45,7 @@ def test_onscreentext_text_pos(): assert text.get_pos() == (0, 0, 0) +@pytest.mark.filterwarnings("ignore::DeprecationWarning") def test_onscreentext_node_pos(): text = OnscreenText() @@ -55,6 +58,7 @@ def test_onscreentext_node_pos(): assert text.get_pos() == (1, 2, 3) +@pytest.mark.filterwarnings("ignore::DeprecationWarning") def test_onscreentext_text_roll(): text = OnscreenText(roll=1) assert text['roll'] == 1 @@ -97,6 +101,7 @@ def test_onscreentext_text_roll(): assert text.get_r() == 0 +@pytest.mark.filterwarnings("ignore::DeprecationWarning") def test_onscreentext_node_roll(): text = OnscreenText() @@ -109,6 +114,7 @@ def test_onscreentext_node_roll(): assert text.get_r() == 45 +@pytest.mark.filterwarnings("ignore::DeprecationWarning") def test_onscreentext_text_scale(): text = OnscreenText(scale=(1, 2)) assert text['scale'] == (1, 2) @@ -159,6 +165,7 @@ def test_onscreentext_text_scale(): assert text.get_scale() == (1, 1, 1) +@pytest.mark.filterwarnings("ignore::DeprecationWarning") def test_onscreentext_node_scale(): text = OnscreenText()