forked from python-validators/validators
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_extremes.py
More file actions
45 lines (32 loc) · 814 Bytes
/
Copy pathtest_extremes.py
File metadata and controls
45 lines (32 loc) · 814 Bytes
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
39
40
41
42
43
44
45
# -*- coding: utf-8 -*-
import pytest
from validators import Max, Min
@pytest.mark.parametrize(('value',), [
(None,),
('',),
(12,),
(Min,),
])
def test_max_is_greater_than_every_other_value(value):
assert value < Max
assert Max > value
def test_max_is_not_greater_than_itself():
assert not (Max < Max)
def test_other_comparison_methods_for_max():
assert Max <= Max
assert Max == Max
assert not (Max != Max)
@pytest.mark.parametrize(('value',), [
(None,),
('',),
(12,),
(Max,),
])
def test_min_is_smaller_than_every_other_value(value):
assert value > Min
def test_min_is_not_greater_than_itself():
assert not (Min < Min)
def test_other_comparison_methods_for_min():
assert Min <= Min
assert Min == Min
assert not (Min != Min)