@@ -19,6 +19,8 @@ def run_result(self, pytester: pytest.Pytester) -> pytest.RunResult:
19
19
(testing "is assertions"
20
20
(is true)
21
21
(is false)
22
+ (is (some #{5} #{6 7}))
23
+ (is (some #{7} #{6 7}))
22
24
(is (= "string" "string"))
23
25
(is (thrown? basilisp.lang.exception/ExceptionInfo (throw (ex-info "Exception" {}))))
24
26
(is (thrown? basilisp.lang.exception/ExceptionInfo (throw (python/Exception))))
@@ -66,15 +68,26 @@ def test_failure_repr(self, run_result: pytest.RunResult):
66
68
"FAIL in (assertion-test) (test_testrunner.lpy:8)" ,
67
69
" is assertions :: Test failure: false" ,
68
70
"" ,
69
- " expected: false" ,
71
+ " expected: (not false) " ,
70
72
" actual: false" ,
71
73
],
72
74
consecutive = True ,
73
75
)
74
76
75
77
run_result .stdout .fnmatch_lines (
76
78
[
77
- "FAIL in (assertion-test) (test_testrunner.lpy:11)" ,
79
+ "FAIL in (assertion-test) (test_testrunner.lpy:9)" ,
80
+ " is assertions :: Test failure: (some #{5} #{6 7})" ,
81
+ "" ,
82
+ " expected: (not nil)" ,
83
+ " actual: nil" ,
84
+ ],
85
+ consecutive = True ,
86
+ )
87
+
88
+ run_result .stdout .fnmatch_lines (
89
+ [
90
+ "FAIL in (assertion-test) (test_testrunner.lpy:13)" ,
78
91
" is assertions :: Expected <class 'basilisp.lang.exception.ExceptionInfo'>; got <class 'Exception'> instead" ,
79
92
"" ,
80
93
" expected: <class 'basilisp.lang.exception.ExceptionInfo'>" ,
@@ -85,7 +98,7 @@ def test_failure_repr(self, run_result: pytest.RunResult):
85
98
86
99
run_result .stdout .fnmatch_lines (
87
100
[
88
- "FAIL in (assertion-test) (test_testrunner.lpy:17 )" ,
101
+ "FAIL in (assertion-test) (test_testrunner.lpy:19 )" ,
89
102
" is assertions :: Regex pattern did not match" ,
90
103
"" ,
91
104
' expected: #"Known exception"' ,
@@ -128,19 +141,19 @@ def test_failure_repr(self, run_result: pytest.RunResult):
128
141
def test_error_repr (self , run_result : pytest .RunResult ):
129
142
if sys .version_info < (3 , 11 ):
130
143
expected = [
131
- "ERROR in (assertion-test) (test_testrunner.lpy:12 )" ,
144
+ "ERROR in (assertion-test) (test_testrunner.lpy:14 )" ,
132
145
"" ,
133
146
"Traceback (most recent call last):" ,
134
- ' File "*test_testrunner.lpy", line 12 , in assertion_test' ,
147
+ ' File "*test_testrunner.lpy", line 14 , in assertion_test' ,
135
148
' (is (throw (ex-info "Uncaught exception" {})))' ,
136
149
"basilisp.lang.exception.ExceptionInfo: Uncaught exception {}" ,
137
150
]
138
151
else :
139
152
expected = [
140
- "ERROR in (assertion-test) (test_testrunner.lpy:12 )" ,
153
+ "ERROR in (assertion-test) (test_testrunner.lpy:14 )" ,
141
154
"" ,
142
155
"Traceback (most recent call last):" ,
143
- ' File "*test_testrunner.lpy", line 12 , in assertion_test' ,
156
+ ' File "*test_testrunner.lpy", line 14 , in assertion_test' ,
144
157
' (is (throw (ex-info "Uncaught exception" {})))' ,
145
158
"basilisp.lang.exception.ExceptionInfo: Uncaught exception {}" ,
146
159
]
@@ -154,7 +167,7 @@ def test_error_repr(self, run_result: pytest.RunResult):
154
167
[
155
168
"ERROR in (error-test) (test_testrunner.lpy)" ,
156
169
"Traceback (most recent call last):" ,
157
- ' File "*test_testrunner.lpy", line 33 , in error_test' ,
170
+ ' File "*test_testrunner.lpy", line 35 , in error_test' ,
158
171
" (throw" ,
159
172
"basilisp.lang.exception.ExceptionInfo: This test will count as an error. {}" ,
160
173
]
0 commit comments