-
Notifications
You must be signed in to change notification settings - Fork 0
/
tests.py
25 lines (20 loc) · 1018 Bytes
/
tests.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import pytest
from apnggif import read_input, read_output
from pathlib import Path
def test_read_input():
assert ["foo"] == read_input("foo")
assert ["foo", "bar"] == read_input(["foo", "bar"])
assert ["foo", "bar"] == read_input(("foo", "bar"))
assert ["/foo"] == read_input(Path("/foo"))
assert ["/foo", "bar"] == read_input([Path("/foo"), "bar"])
assert ["/foo", "bar"] == read_input((Path("/foo"), "bar"))
def test_read_output():
assert ["foo"] == read_output("foo")
assert ["foo", "bar"] == read_output(["foo", "bar"])
assert ["foo", "bar"] == read_output(("foo", "bar"))
assert ["/foo"] == read_output(Path("/foo"))
assert ["/foo", "bar"] == read_output([Path("/foo"), "bar"])
assert ["/foo", "bar"] == read_output((Path("/foo"), "bar"))
assert ["foo", "bar"] == read_output(None, ("foo", "bar"))
assert ["/foo", "bar"] == read_output(None, (Path("/foo"), "bar"))
assert ["/foo.gif", "bar.gif"] == read_output(None, (Path("/foo.png"), "bar.png"))