Skip to content

Commit 9962641

Browse files
committed
Resolve various tcod warnings.
1 parent 7afa5a4 commit 9962641

File tree

6 files changed

+74
-54
lines changed

6 files changed

+74
-54
lines changed

setup.cfg

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ test=pytest
33

44
[tool:pytest]
55
addopts=tcod/ tdl/ tests/ --doctest-modules --cov=tcod --cov=tdl --capture=sys
6+
filterwarnings =
7+
ignore:The tdl module has been deprecated:DeprecationWarning
8+
ignore:::tdl.map
9+
ignore::DeprecationWarning:tcod.libtcodpy
10+
ignore::PendingDeprecationWarning:tcod.libtcodpy
11+
ignore:This class may perform poorly and is no longer needed.::tcod.map
612

713
[flake8]
814
ignore = E203 W503

tcod/console.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -901,7 +901,7 @@ def __repr__(self) -> str:
901901
return (
902902
"tcod.console.Console(width=%i, height=%i, "
903903
"order=%r,buffer=\n%r)"
904-
% (self.width, self.height, self._order, self.buffer)
904+
% (self.width, self.height, self._order, self.tiles)
905905
)
906906

907907
def __str__(self) -> str:

tests/test_console.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def test_array_read_write():
3939
assert tuple(tcod.console_get_char_background(console, 2, 1)) == BG
4040

4141

42-
@pytest.mark.filterwarnings("ignore:.")
42+
@pytest.mark.filterwarnings("ignore")
4343
def test_console_defaults():
4444
console = tcod.console.Console(width=12, height=10)
4545

@@ -58,6 +58,7 @@ def test_console_defaults():
5858

5959
@pytest.mark.filterwarnings("ignore:Parameter names have been moved around,")
6060
@pytest.mark.filterwarnings("ignore:Pass the key color to Console.blit instea")
61+
@pytest.mark.filterwarnings("ignore:.*default values have been deprecated")
6162
def test_console_methods():
6263
console = tcod.console.Console(width=12, height=10)
6364
console.put_char(0, 0, ord('@'))
@@ -97,7 +98,7 @@ def test_console_repr():
9798
eval(repr(tcod.console.Console(10, 2)))
9899

99100

100-
@pytest.mark.filterwarnings("ignore:.")
101+
@pytest.mark.filterwarnings("ignore")
101102
def test_console_str():
102103
console = tcod.console.Console(10, 2)
103104
console.print_(0, 0, "Test")

0 commit comments

Comments
 (0)