File: test_uc_micro.py

package info (click to toggle)
uc-micro-py 2.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 176 kB
  • sloc: python: 37; makefile: 5
file content (38 lines) | stat: -rw-r--r-- 766 bytes parent folder | download
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
26
27
28
29
30
31
32
33
34
35
36
37
38
import re


def test_Any():
    from uc_micro.properties import Any

    assert re.search(Any.regex.REGEX, "A")
    assert not re.search(Any.regex.REGEX, "")


def test_Cc():
    from uc_micro.categories import Cc

    assert re.search(Cc.REGEX, "\r")
    assert not re.search(Cc.REGEX, "A")


def test_Cf():
    from uc_micro.categories import Cf

    assert re.search(Cf.REGEX, "\xad")
    assert not re.search(Cf.REGEX, "A")


def test_P():
    from uc_micro.categories import P

    assert re.search(P.REGEX, ",")
    assert not re.search(P.REGEX, "A")


def test_Z():
    from uc_micro.categories import Z

    assert re.search(Z.REGEX, " ")
    assert re.search(Z.REGEX, "\u2028")
    assert re.search(Z.REGEX, "\u2029")
    assert not re.search(Z.REGEX, "A")