File: test_sixel.py

package info (click to toggle)
textual-image 0.8.5-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,468 kB
  • sloc: python: 1,851; makefile: 2
file content (12 lines) | stat: -rw-r--r-- 361 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
from PIL import Image as PILImage
from syrupy.assertion import SnapshotAssertion

from tests.data import TEST_IMAGE
from textual_image._sixel import image_to_sixels


def test_image_to_sixels(snapshot: SnapshotAssertion) -> None:
    with PILImage.open(TEST_IMAGE) as image:
        image = image.resize((16, 16))

    assert image_to_sixels(image) == snapshot