| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 5a31fe5 commit 35efcfc
5 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -28,6 +28,10 @@ def describe_mismatch(self, item, mismatch_descaription): | |||
| 28 | 28 | ||
| 29 | 29 | def has_container(report, *matchers): | |
| 30 | 30 | """ | |
| 31 | + >>> from hamcrest import assert_that | ||
| 32 | + | ||
| 33 | + >>> from allure_commons_test.report import has_test_case | ||
| 34 | + | ||
| 31 | 35 | >>> class Report(object): | |
| 32 | 36 | ... test_cases = [ | |
| 33 | 37 | ... { | |
@@ -60,7 +64,7 @@ def has_container(report, *matchers): | |||
| 60 | 64 | ... has_before('before_fixture') | |
| 61 | 65 | ... ) | |
| 62 | 66 | ... ) | |
| 63 | - ... ) | ||
| 67 | + ... ) # doctest: +ELLIPSIS | ||
| 64 | 68 | Traceback (most recent call last): | |
| 65 | 69 | ... | |
| 66 | 70 | AssertionError: ... | |
@@ -104,6 +108,8 @@ def describe_to(self, description): | |||
| 104 | 108 | ||
| 105 | 109 | def has_same_container(*args): | |
| 106 | 110 | """ | |
| 111 | + >>> from hamcrest import assert_that | ||
| 112 | + | ||
| 107 | 113 | >>> class Report(object): | |
| 108 | 114 | ... test_cases = [ | |
| 109 | 115 | ... { | |
@@ -134,7 +140,7 @@ def has_same_container(*args): | |||
| 134 | 140 | ||
| 135 | 141 | >>> assert_that(Report, | |
| 136 | 142 | ... has_same_container('second_test_case', 'third_test_case') | |
| 137 | - ... ) | ||
| 143 | + ... ) # doctest: +ELLIPSIS | ||
| 138 | 144 | Traceback (most recent call last): | |
| 139 | 145 | ... | |
| 140 | 146 | AssertionError: ... | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,7 +1,3 @@ | |||
| 1 | - """ | ||
| 2 | - No milk today my love has gone away;) | ||
| 3 | - """ | ||
| 4 | - | ||
| 5 | 1 | from hamcrest import all_of | |
| 6 | 2 | from hamcrest import has_entry, has_item | |
| 7 | 3 | ||
@@ -33,4 +29,4 @@ def has_story(story): | |||
| 33 | 29 | ||
| 34 | 30 | ||
| 35 | 31 | def has_tag(tag): | |
| 36 | - return has_label('tag', tag) | ||
| 32 | + return has_label('tag', tag) | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,4 +1,6 @@ | |||
| 1 | 1 | """ | |
| 2 | + >>> from hamcrest import assert_that | ||
| 3 | + | ||
| 2 | 4 | >>> class Report(object): | |
| 3 | 5 | ... def __init__(self): | |
| 4 | 6 | ... self.test_cases = [ | |
@@ -34,7 +36,7 @@ | |||
| 34 | 36 | ||
| 35 | 37 | >>> assert_that(Report(), | |
| 36 | 38 | ... has_test_case('wrong_test_case_name') | |
| 37 | - ... ) | ||
| 39 | + ... ) # doctest: +ELLIPSIS | ||
| 38 | 40 | Traceback (most recent call last): | |
| 39 | 41 | ... | |
| 40 | 42 | AssertionError: ... | |
@@ -54,7 +56,7 @@ | |||
| 54 | 56 | ... has_test_case('Class#test[param]', | |
| 55 | 57 | ... has_entry('id', '2') | |
| 56 | 58 | ... ) | |
| 57 | - ... ) | ||
| 59 | + ... ) # doctest: +ELLIPSIS | ||
| 58 | 60 | Traceback (most recent call last): | |
| 59 | 61 | ... | |
| 60 | 62 | AssertionError: ... | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -33,15 +33,14 @@ | |||
| 33 | 33 | ... } | |
| 34 | 34 | ... } | |
| 35 | 35 | ||
| 36 | - HAS STEP + | ||
| 36 | + | ||
| 37 | 37 | >>> assert_that(testcases['ideal_case'], has_step('step_one')) | |
| 38 | 38 | ||
| 39 | 39 | ||
| 40 | - HAS STEP +- | ||
| 41 | 40 | >>> assert_that(testcases['ideal_case'], | |
| 42 | - ... has_step('ideal_case'), | ||
| 43 | - ... is_not(has_step('step_one') | ||
| 44 | - ... )) | ||
| 41 | + ... has_step('ideal_case'), | ||
| 42 | + ... is_not(has_step('step_one')) | ||
| 43 | + ... ) # doctest: +ELLIPSIS | ||
| 45 | 44 | Traceback (most recent call last): | |
| 46 | 45 | ... | |
| 47 | 46 | AssertionError: ... | |
@@ -50,8 +49,9 @@ | |||
| 50 | 49 | <BLANKLINE> | |
| 51 | 50 | ||
| 52 | 51 | ||
| 53 | - HAS STEP - | ||
| 54 | - >>> assert_that(testcases['ideal_case'], has_step('wrong_steop_name')) | ||
| 52 | + >>> assert_that(testcases['ideal_case'], | ||
| 53 | + ... has_step('wrong_step_name') | ||
| 54 | + ... ) # doctest: +ELLIPSIS | ||
| 55 | 55 | Traceback (most recent call last): | |
| 56 | 56 | ... | |
| 57 | 57 | AssertionError: ... | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -9,3 +9,7 @@ passenv = | |||
| 9 | 9 | ||
| 10 | 10 | commands= | |
| 11 | 11 | python setup.py develop | |
| 12 | + python -m doctest -v ./src/container.py | ||
| 13 | + python -m doctest -v ./src/report.py | ||
| 14 | + python -m doctest -v ./src/label.py | ||
| 15 | + python -m doctest -v ./src/result.py | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments