Skip to content

Commit bdb70ed

Browse files
committed
Add testing
1 parent 3b15e7d commit bdb70ed

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

test/font_test.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -953,6 +953,7 @@ def test_font_property_should_raise_exception_after_quit(self):
953953
("fixed_width", None),
954954
("fixed_sizes", None),
955955
("antialiased", 45),
956+
("outline", 10),
956957
("kerning", 46),
957958
("vertical", 47),
958959
("pad", 48),
@@ -1057,6 +1058,7 @@ def query(
10571058
underline=False,
10581059
strikethrough=False,
10591060
antialiase=False,
1061+
outline=False,
10601062
):
10611063
if self.aborted:
10621064
return False
@@ -1067,7 +1069,7 @@ def query(
10671069
screen = self.screen
10681070
screen.fill((255, 255, 255))
10691071
pygame.display.flip()
1070-
if not (bold or italic or underline or strikethrough or antialiase):
1072+
if not (bold or italic or underline or strikethrough or antialiase or outline):
10711073
text = "normal"
10721074
else:
10731075
modes = []
@@ -1081,11 +1083,14 @@ def query(
10811083
modes.append("strikethrough")
10821084
if antialiase:
10831085
modes.append("antialiased")
1086+
if outline:
1087+
modes.append("outline")
10841088
text = f"{'-'.join(modes)} (y/n):"
10851089
f.set_bold(bold)
10861090
f.set_italic(italic)
10871091
f.set_underline(underline)
10881092
f.set_strikethrough(strikethrough)
1093+
f.outline = outline
10891094
s = f.render(text, antialiase, (0, 0, 0))
10901095
screen.blit(s, (offset, y))
10911096
y += s.get_size()[1] + spacing
@@ -1125,6 +1130,9 @@ def test_strikethrough(self):
11251130
def test_antialiase(self):
11261131
self.assertTrue(self.query(antialiase=True))
11271132

1133+
def test_outline(self):
1134+
self.assertTrue(self.query(outline=True))
1135+
11281136
def test_bold_antialiase(self):
11291137
self.assertTrue(self.query(bold=True, antialiase=True))
11301138

0 commit comments

Comments
 (0)