Skip to content

Commit 6c43f23

Browse files
authored
Merge branch 'master' into test_for_no_invalidations
2 parents 9c8c8a1 + 92bcc94 commit 6c43f23

File tree

6 files changed

+126
-53
lines changed

6 files changed

+126
-53
lines changed

deps/blastrampoline.version

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
BLASTRAMPOLINE_JLL_NAME := libblastrampoline
55

66
## source build
7-
BLASTRAMPOLINE_VER := 5.12.0
8-
BLASTRAMPOLINE_BRANCH=v5.12.0
9-
BLASTRAMPOLINE_SHA1=b127bc8dd4758ffc064340fff2aef4ead552f386
7+
BLASTRAMPOLINE_VER := 5.13.1
8+
BLASTRAMPOLINE_BRANCH=v5.13.1
9+
BLASTRAMPOLINE_SHA1=f26278e83ddc9035ae7695da597f1a5b26a4c62b

deps/checksums/blastrampoline

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
1-
blastrampoline-b127bc8dd4758ffc064340fff2aef4ead552f386.tar.gz/md5/395f2035bcb52e886b55ac926a7bf183
2-
blastrampoline-b127bc8dd4758ffc064340fff2aef4ead552f386.tar.gz/sha512/9ae0fe2ca75dc0b2c784d5b7248caca29ed6d44258743ee2b32827032734757e9078dd6bcdf80a02b042deb5c7ca7b4e5be392be6700efde91427091fb53a03f
3-
libblastrampoline.v5.12.0+0.aarch64-apple-darwin.tar.gz/md5/9a18b39bb575d0112834992043d302c0
4-
libblastrampoline.v5.12.0+0.aarch64-apple-darwin.tar.gz/sha512/4e406b155149414d3e4fd5db49ab56a87ed13577ebb399eaf8a251692c0b84e639c6e1a4eb20863e2638c31add0241ca916e57f91bb5a4aed07e2c56cc580870
5-
libblastrampoline.v5.12.0+0.aarch64-linux-gnu.tar.gz/md5/e100e93f0d6a104fc66c9f78a67150c5
6-
libblastrampoline.v5.12.0+0.aarch64-linux-gnu.tar.gz/sha512/f7e0c379e32d8163dbb4919b77e9637e1b16cf26618b9260222cf985bfab9ca3f36bebccd0e8360af68db925035c82127ba85d46b4a6578961dde6a049c7cf93
7-
libblastrampoline.v5.12.0+0.aarch64-linux-musl.tar.gz/md5/814a79e8cfe8744ca5a2a722f007fcaa
8-
libblastrampoline.v5.12.0+0.aarch64-linux-musl.tar.gz/sha512/bc886b199500fc4245a95446d4c862fc636711e0875a9d5cf9aef661d819d00324adfd3e037d9c03e274be26034353d033fb041e7608ecef222e1d154f38337d
9-
libblastrampoline.v5.12.0+0.aarch64-unknown-freebsd.tar.gz/md5/9b9a7fe0e45a73009bb9f8044f4a27a2
10-
libblastrampoline.v5.12.0+0.aarch64-unknown-freebsd.tar.gz/sha512/51d52afb13e326ef4750bdcad800aaf3db2c9e068b4c38bd148e312c63358b2228b81d23626d18b8983534a8a6f24df1b64b4e7121779d2535574ea907bd18ba
11-
libblastrampoline.v5.12.0+0.armv6l-linux-gnueabihf.tar.gz/md5/1b6fd062d133b13e8efc63f08528fb51
12-
libblastrampoline.v5.12.0+0.armv6l-linux-gnueabihf.tar.gz/sha512/78d525f425ee27068b94b94f89ef44a51ffac9f642ffe66e177434804e59b4ac3ba875190aceee386a8d740f7903e979e5b91f0973138d0fc7753061c6f5f26d
13-
libblastrampoline.v5.12.0+0.armv6l-linux-musleabihf.tar.gz/md5/506be2b7669aa171efcc541388cb5444
14-
libblastrampoline.v5.12.0+0.armv6l-linux-musleabihf.tar.gz/sha512/2975136376c3f61b8f227676c4e1368d1847d85ff469dddbc0a330635eac77c00072c7544ae4aa9981d16a4ab04d494be54fc951b434a56fbf14003c42626579
15-
libblastrampoline.v5.12.0+0.armv7l-linux-gnueabihf.tar.gz/md5/99403eae880f52aa97884143e2ca7215
16-
libblastrampoline.v5.12.0+0.armv7l-linux-gnueabihf.tar.gz/sha512/986dfcf5fe3ac731df3c71eb6b0bf3d7525511952d22cc9128ff35e6fcb330acf69e897aeb97920ebabd1ccccd1dd6ce9b6c16d0dbf661d39a103ce5b477462f
17-
libblastrampoline.v5.12.0+0.armv7l-linux-musleabihf.tar.gz/md5/20adf8d2ef348f5362cb03e1a2780476
18-
libblastrampoline.v5.12.0+0.armv7l-linux-musleabihf.tar.gz/sha512/95068a3b5bcf17bd5f13373a2730a6508d3992f0aa83a91629527821cf038b9607327843cc44fb72730b63c01d3d70e2eb488eca8f48ed9444d7736f67745d02
19-
libblastrampoline.v5.12.0+0.i686-linux-gnu.tar.gz/md5/a56f833ad986fc3e9e64e5abdb16915f
20-
libblastrampoline.v5.12.0+0.i686-linux-gnu.tar.gz/sha512/d478b4981dc17afb8aa8625fdbb23139f1c3edaa9aaa179e70d274984a056147b2e65e9f473b007733d094369f448823c33aa95fadd228016ecf9dfbf17f06bb
21-
libblastrampoline.v5.12.0+0.i686-linux-musl.tar.gz/md5/8578119b3b3e84393e6324996e9506aa
22-
libblastrampoline.v5.12.0+0.i686-linux-musl.tar.gz/sha512/b546de6687755ce43680f312008a23a8f9df422603098807f33e2ae969c9e9de0ca32a3319067d4f8fa1f782f21b6465638cd59e4c86fc6261fb4180f0ed116f
23-
libblastrampoline.v5.12.0+0.i686-w64-mingw32.tar.gz/md5/b9e2800b8758d3fa0ac0597f738c399c
24-
libblastrampoline.v5.12.0+0.i686-w64-mingw32.tar.gz/sha512/e0aa0ee2a750cfe702e0bd5861e352f97f433f67444dbc6e5814055fb32f571de318f640ac670c91bad233f8af85f0421daef71b7768a710de5b15febee28b27
25-
libblastrampoline.v5.12.0+0.powerpc64le-linux-gnu.tar.gz/md5/bab2048857c7c1ba4a6c3d540b9275c6
26-
libblastrampoline.v5.12.0+0.powerpc64le-linux-gnu.tar.gz/sha512/576026c970b19cc00480d7bb9439933c5bb432eec17def66b22f5c0dfd418bcf75bb10ccfc1b01fef48e8d504ebf953c5f6c63d504713315c43d9579ab5fa2e4
27-
libblastrampoline.v5.12.0+0.riscv64-linux-gnu.tar.gz/md5/f37e2849a948a8c8c8bfa6055e30909c
28-
libblastrampoline.v5.12.0+0.riscv64-linux-gnu.tar.gz/sha512/89f30d52f1a1dcc0aa38b4b343534b7fadcff12d788f455172c043ea2511c03b2735fdacf8f794a6f62156cb5d82fb0e9e0edd04bb9c57a1ca3e680410456b17
29-
libblastrampoline.v5.12.0+0.x86_64-apple-darwin.tar.gz/md5/b07c42b602b91bf2229b1a5cfd8e37b3
30-
libblastrampoline.v5.12.0+0.x86_64-apple-darwin.tar.gz/sha512/ab064dff373826776f9b64a4a77e3418461d53d5119798a5e702967e4ac4f68c58cd8c3c0cc01bda3edeb613cf50b9d3171d9141c91ff9ef3a2c88a8e8f00a37
31-
libblastrampoline.v5.12.0+0.x86_64-linux-gnu.tar.gz/md5/c37b01242012e51e124711d5ad10cf97
32-
libblastrampoline.v5.12.0+0.x86_64-linux-gnu.tar.gz/sha512/3f9015bec4aaddc677cb3f3aebd432db8bad89b3f6e563634a37569afeb9fb0efa4f214166c984c2c1926831d5cd79fcd4d605d40675e0d1a7e494a76c066f02
33-
libblastrampoline.v5.12.0+0.x86_64-linux-musl.tar.gz/md5/c24e440a1757a45f087a2e1ac649fb45
34-
libblastrampoline.v5.12.0+0.x86_64-linux-musl.tar.gz/sha512/824b930d50df929fd22ead6dffad06593d2aad9fcb149f07f1c2f6d4b7b34911e89c2be5a1e9b8ad5ad8292ac29f9e5dbe6d7bb205d2b207432ade61ae5f8b68
35-
libblastrampoline.v5.12.0+0.x86_64-unknown-freebsd.tar.gz/md5/5721328a24473cefbb3e77ba85e46922
36-
libblastrampoline.v5.12.0+0.x86_64-unknown-freebsd.tar.gz/sha512/3537ea491828492f1cb68fa961dc5574b63a88b49abf19eb86f9d1a4544e1398fcd84d6338c6dcb9550ee3abcdcab0654f5cc2b85699c5ed5b3b31a1c35a199d
37-
libblastrampoline.v5.12.0+0.x86_64-w64-mingw32.tar.gz/md5/450afb701cc2899c7c083bd3f3e580a0
38-
libblastrampoline.v5.12.0+0.x86_64-w64-mingw32.tar.gz/sha512/e4d1785a06b051a4f16edd7343021eed61ac45cf45d26b4e3ef1e54cfaadb44da2e74b7d854e31b05a733dbb3004f3e85644967316c4f41d1ad64400fed126f2
1+
blastrampoline-f26278e83ddc9035ae7695da597f1a5b26a4c62b.tar.gz/md5/855b7723a6e9eb8885876eb675d48329
2+
blastrampoline-f26278e83ddc9035ae7695da597f1a5b26a4c62b.tar.gz/sha512/29cbd060c8f5eb17ef486d0a10ee4b221eeceec3a2ab0f9f98f60880f3d19a2247d93ac0dc0d32ec568ef876acd30f6c0642aaf704757580c2e17884e425607f
3+
libblastrampoline.v5.13.1+0.aarch64-apple-darwin.tar.gz/md5/d8dc0f092f86b379b2fb9da97382be70
4+
libblastrampoline.v5.13.1+0.aarch64-apple-darwin.tar.gz/sha512/d9fc0439565afaabe53f56f64c20aeddb846c991dafeafdef6c2369bd7a359c1a6b49cdf8d63eaae2730a336509854b5c306e630eb520445712efc4e41c0263e
5+
libblastrampoline.v5.13.1+0.aarch64-linux-gnu.tar.gz/md5/c181e51a6ca4cde0da3d036d561e24dc
6+
libblastrampoline.v5.13.1+0.aarch64-linux-gnu.tar.gz/sha512/fe4a86bb4c94ef86c2307adad528bb58d0508a33c194c64190fffe7902f5b915592567d9e0cc35414633c5ab9067def2fa20cf669a2f4309265744180a5ec51a
7+
libblastrampoline.v5.13.1+0.aarch64-linux-musl.tar.gz/md5/6f9eb8d73a0e61f3a2b97dba7105086e
8+
libblastrampoline.v5.13.1+0.aarch64-linux-musl.tar.gz/sha512/9c3db080155729a91b5dd47df91d3852539aefc331d4dc51167fccaf3b01e601b36911ec259c53e211fe192c108e839a1f14b837009fa4f7d88ed82d658f80ff
9+
libblastrampoline.v5.13.1+0.aarch64-unknown-freebsd.tar.gz/md5/68f65db9da9938929d510eea3540335b
10+
libblastrampoline.v5.13.1+0.aarch64-unknown-freebsd.tar.gz/sha512/2fc7b375a751f3bb201504e0417828602fe014a2c8626137779c09ca7264ac6d39d44db0d1d32e0dc506284f56b49e23791922b0cc1237021473fb505fbf06bd
11+
libblastrampoline.v5.13.1+0.armv6l-linux-gnueabihf.tar.gz/md5/a377fa4e5751fbeb3c42f319cb6341de
12+
libblastrampoline.v5.13.1+0.armv6l-linux-gnueabihf.tar.gz/sha512/9ddb1e2f4daab45d65b66dafc00df6ca7f788cb919cd6699c4aa0deca3e99a86d9ced10c3741610a6e480093d483e8a02c1d9165f91a7179632c1e2ae1abcfb7
13+
libblastrampoline.v5.13.1+0.armv6l-linux-musleabihf.tar.gz/md5/42c841baa05f80f17ea1b1d4f3405bef
14+
libblastrampoline.v5.13.1+0.armv6l-linux-musleabihf.tar.gz/sha512/0c3ed42bd48f8f1ee9b1dc18faa7afa6e2fb27cffc59b9a420e29b5e6cdf8fb3bde36b82f3086075f8f7f329614aeb91ca5f173b1683e30e9530076f341ea2e0
15+
libblastrampoline.v5.13.1+0.armv7l-linux-gnueabihf.tar.gz/md5/61e515ec1223c99705175a26e6fbaf87
16+
libblastrampoline.v5.13.1+0.armv7l-linux-gnueabihf.tar.gz/sha512/92260dcc563ece74719f21921a7cb51266884ed01b50c97fa997b4a98737e900ec9eaa8012d2c4c67ab479c4080bd1cf2708612eaaaddbba28e4f9147f3708ea
17+
libblastrampoline.v5.13.1+0.armv7l-linux-musleabihf.tar.gz/md5/d45816d705dd46572d85105567bc060e
18+
libblastrampoline.v5.13.1+0.armv7l-linux-musleabihf.tar.gz/sha512/45cba07050b818cd85c67acdfc29515e1fe416eb4e0c219171f2c0c026f7412903c3a9367d48258259a16e89f36c1e8f9fa054e455759720f1c6c5e8e27be476
19+
libblastrampoline.v5.13.1+0.i686-linux-gnu.tar.gz/md5/c8d3fd5f314353133934396361857c92
20+
libblastrampoline.v5.13.1+0.i686-linux-gnu.tar.gz/sha512/a949b3c0655ad9d6f8d53fd8a3f0b4ab504046e49a373039defc94e832b7faf90c77520f3912c4d6db8b0829951d85b4fc2a4021b3d8bb2c399d1ad04ce77ab0
21+
libblastrampoline.v5.13.1+0.i686-linux-musl.tar.gz/md5/a7bbd2233366d180ce8aa61fd3568c11
22+
libblastrampoline.v5.13.1+0.i686-linux-musl.tar.gz/sha512/e78cbef5b3bcfa93a86e14eebf0d704a94ac7b1f5c7030706d1f4a960de888c42e3daddb65395c7102e08dfd444efbfb40273e58a5f1de199d44ad55fd3ae658
23+
libblastrampoline.v5.13.1+0.i686-w64-mingw32.tar.gz/md5/4ca5cf3f855d04d3e8bdbd15321944ad
24+
libblastrampoline.v5.13.1+0.i686-w64-mingw32.tar.gz/sha512/33160caa000c6c44cedd594195e1f2efefb950459653ee12ad2be4cedf0b833874772512f1812948d753f075ee7b8fe5629e5f9bd753a3da7804c4a6e1b0e0a8
25+
libblastrampoline.v5.13.1+0.powerpc64le-linux-gnu.tar.gz/md5/8be947c20f7d35ec22247f9a11ccce43
26+
libblastrampoline.v5.13.1+0.powerpc64le-linux-gnu.tar.gz/sha512/56f4246f96d2f49b03f5e5f3b996660a48d50b3784f89df7cd1dc52bab6efea0c120a65015040041a51d18fc6f361f89486f77317d771fbf588a1ba7565d77a2
27+
libblastrampoline.v5.13.1+0.riscv64-linux-gnu.tar.gz/md5/85e1f70a3235097158b4884a58a58154
28+
libblastrampoline.v5.13.1+0.riscv64-linux-gnu.tar.gz/sha512/11f1f5c2a409dbdab11d6bc968610b5700e9b0cb95094e348fe43ddca5586eda47bda1c382fb1f4b5a15aa741a6fc2b31f58f9b08bfe46631b5471e864bc009b
29+
libblastrampoline.v5.13.1+0.x86_64-apple-darwin.tar.gz/md5/c6756ca8b6778ce2a4a440f63355c32e
30+
libblastrampoline.v5.13.1+0.x86_64-apple-darwin.tar.gz/sha512/895d9bba75a9a0861809dca48b3dae7b5ffc5d866a518729ffd52f70fa1742a41a4b8b4e03bb354cba12d9ad11a33f3f112fa69a30ab3f945a9dede0d59d92b3
31+
libblastrampoline.v5.13.1+0.x86_64-linux-gnu.tar.gz/md5/1326a406aa98b6045f7459d7fb237894
32+
libblastrampoline.v5.13.1+0.x86_64-linux-gnu.tar.gz/sha512/4965baa1de5532425ea57b8100e369cf44b55963340cd144c0359f845560f27a1bea1597e4c72ec541917f71aaff8a4863f47d01a095c2e761a68212bfb08d1e
33+
libblastrampoline.v5.13.1+0.x86_64-linux-musl.tar.gz/md5/5103983b7fecc7b87f495cd3b6c4d7a5
34+
libblastrampoline.v5.13.1+0.x86_64-linux-musl.tar.gz/sha512/f3243d84a0a0a191abad9e3850c37be78892eb5905b63b47bfb3e5a4148e0dae672ee72d311c5c764ad0fffe57d39c10dfd2086466efd76b5030118941d36a00
35+
libblastrampoline.v5.13.1+0.x86_64-unknown-freebsd.tar.gz/md5/a001ecd07b5178ce724a4f78996dc43e
36+
libblastrampoline.v5.13.1+0.x86_64-unknown-freebsd.tar.gz/sha512/508866d54a9a49df2ef7eaa5d807173016c6dfaec59c4c89d5b37cd3faa7384302d2d4d39aca1975d79a948414657b7ec048a3ebdf6bf5c938037aa89303013a
37+
libblastrampoline.v5.13.1+0.x86_64-w64-mingw32.tar.gz/md5/14fc4ec99e72e5bb646f5e6e8410fe01
38+
libblastrampoline.v5.13.1+0.x86_64-w64-mingw32.tar.gz/sha512/b7d07218047917fe217736b3c97d2b0565f6c904cd9cf6de96e38c66552aeec13b3cde714775fce1eb5a230db0ec0f2822572de8f0e166cb042552a16beb2b79

stdlib/Test/src/Test.jl

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,10 @@ struct Error <: Result
214214
orig_expr::String
215215
value::String
216216
backtrace::String
217+
context::Union{Nothing, String}
217218
source::LineNumberNode
218219

219-
function Error(test_type::Symbol, orig_expr, value, bt, source::LineNumberNode)
220+
function Error(test_type::Symbol, orig_expr, value, bt, source::LineNumberNode, context::Union{Nothing, String}=nothing)
220221
if test_type === :test_error
221222
bt = scrub_exc_stack(bt, nothing, extract_file(source))
222223
end
@@ -249,8 +250,14 @@ struct Error <: Result
249250
string(orig_expr),
250251
value,
251252
bt_str,
253+
context,
252254
source)
253255
end
256+
257+
# Internal constructor for creating Error with pre-processed values (used by ContextTestSet)
258+
function Error(test_type::Symbol, orig_expr::String, value::String, backtrace::String, context::Union{Nothing, String}, source::LineNumberNode)
259+
return new(test_type, orig_expr, value, backtrace, context, source)
260+
end
254261
end
255262

256263
function Base.show(io::IO, t::Error)
@@ -268,6 +275,9 @@ function Base.show(io::IO, t::Error)
268275
elseif t.test_type === :test_error
269276
println(io, " Test threw exception")
270277
println(io, " Expression: ", t.orig_expr)
278+
if t.context !== nothing
279+
println(io, " Context: ", t.context)
280+
end
271281
# Capture error message and indent to match
272282
join(io, (" " * line for line in filter!(!isempty, split(t.backtrace, "\n"))), "\n")
273283
elseif t.test_type === :test_unbroken
@@ -752,13 +762,13 @@ function do_test(result::ExecutionResult, orig_expr)
752762
Fail(:test, orig_expr, result.data, value, nothing, result.source, false)
753763
else
754764
# If the result is non-Boolean, this counts as an Error
755-
Error(:test_nonbool, orig_expr, value, nothing, result.source)
765+
Error(:test_nonbool, orig_expr, value, nothing, result.source, nothing)
756766
end
757767
else
758768
# The predicate couldn't be evaluated without throwing an
759769
# exception, so that is an Error and not a Fail
760770
@assert isa(result, Threw)
761-
testres = Error(:test_error, orig_expr, result.exception, result.backtrace::Vector{Any}, result.source)
771+
testres = Error(:test_error, orig_expr, result.exception, result.backtrace::Vector{Any}, result.source, nothing)
762772
end
763773
isa(testres, Pass) || trigger_test_failure_break(result)
764774
record(get_testset(), testres)
@@ -771,11 +781,11 @@ function do_broken_test(result::ExecutionResult, orig_expr)
771781
value = result.value
772782
if isa(value, Bool)
773783
if value
774-
testres = Error(:test_unbroken, orig_expr, value, nothing, result.source)
784+
testres = Error(:test_unbroken, orig_expr, value, nothing, result.source, nothing)
775785
end
776786
else
777787
# If the result is non-Boolean, this counts as an Error
778-
testres = Error(:test_nonbool, orig_expr, value, nothing, result.source)
788+
testres = Error(:test_nonbool, orig_expr, value, nothing, result.source, nothing)
779789
end
780790
end
781791
record(get_testset(), testres)
@@ -1109,6 +1119,13 @@ function record(c::ContextTestSet, t::Fail)
11091119
context = t.context === nothing ? context : string(t.context, "\n ", context)
11101120
record(c.parent_ts, Fail(t.test_type, t.orig_expr, t.data, t.value, context, t.source, t.message_only))
11111121
end
1122+
function record(c::ContextTestSet, t::Error)
1123+
context = string(c.context_name, " = ", c.context)
1124+
context = t.context === nothing ? context : string(t.context, "\n ", context)
1125+
# Create a new Error with the same data but updated context using internal constructor
1126+
new_error = Error(t.test_type, t.orig_expr, t.value, t.backtrace, context, t.source)
1127+
record(c.parent_ts, new_error)
1128+
end
11121129

11131130
#-----------------------------------------------------------------------
11141131

@@ -1845,7 +1862,7 @@ function testset_beginend_call(args, tests, source)
18451862
if is_failfast_error(err)
18461863
get_testset_depth() > 1 ? rethrow() : failfast_print()
18471864
else
1848-
record(ts, Error(:nontest_error, Expr(:tuple), err, Base.current_exceptions(), $(QuoteNode(source))))
1865+
record(ts, Error(:nontest_error, Expr(:tuple), err, Base.current_exceptions(), $(QuoteNode(source)), nothing))
18491866
end
18501867
finally
18511868
copy!(default_rng(), default_rng_orig)
@@ -1933,7 +1950,7 @@ function testset_forloop(args, testloop, source)
19331950
if is_failfast_error(err)
19341951
get_testset_depth() > 1 ? rethrow() : failfast_print()
19351952
else
1936-
record(ts, Error(:nontest_error, Expr(:tuple), err, Base.current_exceptions(), $(QuoteNode(source))))
1953+
record(ts, Error(:nontest_error, Expr(:tuple), err, Base.current_exceptions(), $(QuoteNode(source)), nothing))
19371954
end
19381955
end
19391956
end

stdlib/Test/test/runtests.jl

Lines changed: 57 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ let retval_tests = @testset NoThrowTestSet begin
390390
ts = Test.DefaultTestSet("Mock for testing retval of record(::DefaultTestSet, ::T <: Result) methods")
391391
pass_mock = Test.Pass(:test, 1, 2, 3, LineNumberNode(0, "A Pass Mock"))
392392
@test Test.record(ts, pass_mock) isa Test.Pass
393-
error_mock = Test.Error(:test, 1, 2, 3, LineNumberNode(0, "An Error Mock"))
393+
error_mock = Test.Error(:test, 1, 2, 3, LineNumberNode(0, "An Error Mock"), nothing)
394394
@test Test.record(ts, error_mock; print_result=false) isa Test.Error
395395
fail_mock = Test.Fail(:test, 1, 2, 3, nothing, LineNumberNode(0, "A Fail Mock"), false)
396396
@test Test.record(ts, fail_mock; print_result=false) isa Test.Fail
@@ -1892,3 +1892,59 @@ end
18921892
@test _escape_call(:((==).(x, y))) == (; func=Expr(:., esc(:(==))), args, kwargs, quoted_func=QuoteNode(Expr(:., :(==))))
18931893
end
18941894
end
1895+
1896+
@testset "Context display in @testset let blocks" begin
1897+
# Mock parent testset that just captures results
1898+
struct MockParentTestSet <: Test.AbstractTestSet
1899+
results::Vector{Any}
1900+
MockParentTestSet() = new([])
1901+
end
1902+
Test.record(ts::MockParentTestSet, t) = (push!(ts.results, t); t)
1903+
Test.finish(ts::MockParentTestSet) = ts
1904+
1905+
@testset "context shown when a context testset fails" begin
1906+
mock_parent1 = MockParentTestSet()
1907+
ctx_ts1 = Test.ContextTestSet(mock_parent1, :x, 42)
1908+
1909+
fail_result = Test.Fail(:test, "x == 99", "42 == 99", "42", nothing, LineNumberNode(1, :test), false)
1910+
Test.record(ctx_ts1, fail_result)
1911+
1912+
@test length(mock_parent1.results) == 1
1913+
recorded_fail = mock_parent1.results[1]
1914+
@test recorded_fail isa Test.Fail
1915+
@test recorded_fail.context !== nothing
1916+
@test occursin("x = 42", recorded_fail.context)
1917+
end
1918+
1919+
@testset "context shown when a context testset errors" begin
1920+
mock_parent2 = MockParentTestSet()
1921+
ctx_ts2 = Test.ContextTestSet(mock_parent2, :x, 42)
1922+
1923+
# Use internal constructor to create Error with pre-processed values
1924+
error_result = Test.Error(:test_error, "error(\"test\")", "ErrorException(\"test\")", "test\nStacktrace:\n [1] error()", nothing, LineNumberNode(1, :test))
1925+
Test.record(ctx_ts2, error_result)
1926+
1927+
@test length(mock_parent2.results) == 1
1928+
recorded_error = mock_parent2.results[1]
1929+
@test recorded_error isa Test.Error
1930+
@test recorded_error.context !== nothing
1931+
@test occursin("x = 42", recorded_error.context)
1932+
1933+
# Context shows up in string representation
1934+
error_str = sprint(show, recorded_error)
1935+
@test occursin("Context:", error_str)
1936+
@test occursin("x = 42", error_str)
1937+
1938+
# Multiple variables context
1939+
mock_parent3 = MockParentTestSet()
1940+
ctx_ts3 = Test.ContextTestSet(mock_parent3, :(x, y), (42, "hello"))
1941+
1942+
error_result2 = Test.Error(:test_error, "error(\"test\")", "ErrorException(\"test\")", "test\nStacktrace:\n [1] error()", nothing, LineNumberNode(1, :test))
1943+
Test.record(ctx_ts3, error_result2)
1944+
1945+
recorded_error2 = mock_parent3.results[1]
1946+
@test recorded_error2 isa Test.Error
1947+
@test recorded_error2.context !== nothing
1948+
@test occursin("(x, y) = (42, \"hello\")", recorded_error2.context)
1949+
end
1950+
end

stdlib/libblastrampoline_jll/Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
name = "libblastrampoline_jll"
22
uuid = "8e850b90-86db-534c-a0d3-1478176c7d93"
3-
version = "5.12.0+0"
3+
version = "5.13.1+0"
44

55
[deps]
66
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
77
Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"
88

99
[compat]
10-
julia = "1.12"
10+
julia = "1.13"
1111

1212
[extras]
1313
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

0 commit comments

Comments
 (0)