mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Fix and re-enable imagegen_test.go (1/2: Fix.)
PIL requires a string format name, whereas `Format.PNG` is an "enum string" which is not quite the same type. I had not noticed this problem because I had manually tested the test on a VM where the cached Stable Diffusion XL Docker image was from before this change. Tested on a fresh VM with a freshly-built Docker image now. This is split in two changes because the image needs to be rebuilt. The first change updates the image, and the second change re-enables the test. PiperOrigin-RevId: 618048266
This commit is contained in:
committed by
gVisor bot
parent
628f1bad34
commit
ce673f29ce
@@ -241,7 +241,7 @@ if args.format in (Format.PNG, Format.JPEG):
|
||||
image.save(args.out, args.format)
|
||||
else:
|
||||
buf = io.BytesIO()
|
||||
image.save(buf, format=Format.PNG)
|
||||
image.save(buf, format=Format.PNG.value)
|
||||
image_bytes = buf.getvalue()
|
||||
time_done = datetime.datetime.now(datetime.timezone.utc)
|
||||
with open(args.out, 'wb') as f:
|
||||
|
||||
Reference in New Issue
Block a user