Skip to content

Commit b0a3432

Browse files
format, update test error message
1 parent a226185 commit b0a3432

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

src_c/surface.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1418,13 +1418,11 @@ surf_convert(pgSurfaceObject *self, PyObject *args)
14181418
if (!PyArg_ParseTuple(args, "|Oi", &argobject, &flags))
14191419
return NULL;
14201420

1421-
14221421
if (!argobject && !SDL_WasInit(SDL_INIT_VIDEO))
14231422
return RAISE(pgExc_SDLError,
14241423
"cannot convert without format "
14251424
"when pygame.display is not initialized");
14261425

1427-
14281426
SURF_INIT_CHECK(surf)
14291427

14301428
pgSurface_Prep(self);

test/surface_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1234,7 +1234,7 @@ def test_convert_init(self):
12341234
filename = example_path(os.path.join("data", "alien3.png")) # 8bit PNG
12351235
surf8bit = pygame.image.load(filename)
12361236

1237-
self.assertRaisesRegex(pygame.error, "display initialized", surf.convert)
1237+
self.assertRaisesRegex(pygame.error, "display is not initialized", surf.convert)
12381238

12391239
pygame.display.init()
12401240
try:

0 commit comments

Comments
 (0)