File: test_package_level_access.py

package info (click to toggle)
python-rstr 3.2.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 148 kB
  • sloc: python: 408; sh: 7; makefile: 4
file content (16 lines) | stat: -rw-r--r-- 401 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import unittest
import re

import rstr


class TestPackageLevelFunctions(unittest.TestCase):

    def test_rstr(self) -> None:
        assert re.match(r'^[ABC]+$', rstr.rstr('ABC'))

    def test_xeger(self) -> None:
        assert re.match(r'^foo[\d]{10}bar$', rstr.xeger(r'^foo[\d]{10}bar$'))

    def test_convenience_function(self) -> None:
        assert re.match(r'^[a-zA-Z]+$', rstr.letters())