fix docs: comparator table

This commit is contained in:
debugtalk
2017-12-13 15:42:37 +08:00
parent 9e6ba32648
commit 08f1acf3f3
+3 -3
View File
@@ -68,7 +68,7 @@ Comparator
``HttpRunner`` currently supports the following comparators. ``HttpRunner`` currently supports the following comparators.
+---------------------------+---------------------------+-------------------------+--------------------------+ +---------------------------+---------------------------+-------------------------+--------------------------+
| comparator | Description | A(check), B(expect) | examples | | comparator | Description | A(check), B(expect) | examples |
+===========================+===========================+=========================+==========================+ +===========================+===========================+=========================+==========================+
| ``eq``, ``==`` | value is equal | A == B | 9 eq 9 | | ``eq``, ``==`` | value is equal | A == B | 9 eq 9 |
+---------------------------+---------------------------+-------------------------+--------------------------+ +---------------------------+---------------------------+-------------------------+--------------------------+
@@ -105,9 +105,9 @@ Comparator
| ``contained_by`` | contained by | A in B | | 'a' contained_by 'abc' | | ``contained_by`` | contained by | A in B | | 'a' contained_by 'abc' |
| | | | | 1 contained_by [1,2] | | | | | | 1 contained_by [1,2] |
+---------------------------+---------------------------+-------------------------+--------------------------+ +---------------------------+---------------------------+-------------------------+--------------------------+
| ``type_match`` | A is instance of B | isinstance(A, B) | 123 type_match 'int' | | ``type_match`` | A is instance of B | isinstance(A, B) | 123 type_match 'int' |
+---------------------------+---------------------------+-------------------------+--------------------------+ +---------------------------+---------------------------+-------------------------+--------------------------+
| ``regex_match`` | regex matches | re.match(B, A) | 'abcdef' regex_match 'a\w+d' | | ``regex_match`` | regex matches | re.match(B, A) | 'abcdef' regex 'a\w+d' |
+---------------------------+---------------------------+-------------------------+--------------------------+ +---------------------------+---------------------------+-------------------------+--------------------------+
| ``startswith`` | starts with | A.startswith(B) is True | 'abc' startswith 'ab' | | ``startswith`` | starts with | A.startswith(B) is True | 'abc' startswith 'ab' |
+---------------------------+---------------------------+-------------------------+--------------------------+ +---------------------------+---------------------------+-------------------------+--------------------------+