File: test_rectangle.py

package info (click to toggle)
python-imgviz 1.2.4%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 9,268 kB
  • sloc: python: 3,032; makefile: 15
file content (10 lines) | stat: -rw-r--r-- 254 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
import numpy as np

import imgviz


def test_rectangle():
    img = np.full((100, 100, 3), 255, dtype=np.uint8)
    res = imgviz.draw.rectangle(img, (0, 0), (50, 50), outline=(0, 0, 0))
    assert res.shape == img.shape
    assert res.dtype == img.dtype