Skip to content

Instantly share code, notes, and snippets.

@simonbyrne
Last active Nov 7, 2018
Embed
What would you like to do?
Cassette/DataFrame/Test error
[[Base64]]
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
[[BinaryProvider]]
deps = ["Libdl", "Pkg", "SHA", "Test"]
git-tree-sha1 = "9930c1a6cd49d9fcd7218df6be417e6ae4f1468a"
uuid = "b99e7846-7c00-51b0-8f62-c81ae34c0232"
version = "0.5.2"
[[Cassette]]
deps = ["InteractiveUtils", "LinearAlgebra", "Test"]
git-tree-sha1 = "26fee677e5047978ad52d25f3f00fc86cecd1297"
uuid = "7057c7e9-c182-5462-911a-8362d720325c"
version = "0.1.2"
[[CategoricalArrays]]
deps = ["Compat", "Future", "JSON", "Missings", "Printf", "Reexport"]
git-tree-sha1 = "6362c49130b5888f5628bc197ee5f17aec7d2a88"
uuid = "324d7699-5711-5eae-9e2f-1d82baa6b597"
version = "0.4.0"
[[CodecZlib]]
deps = ["BinaryProvider", "Libdl", "Test", "TranscodingStreams"]
git-tree-sha1 = "e3df104c84dfc108f0ca203fd7f5bbdc98641ae9"
uuid = "944b1d66-785c-5afd-91f1-9de20f533193"
version = "0.5.1"
[[Compat]]
deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mmap", "Pkg", "Printf", "REPL", "Random", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UUIDs", "Unicode"]
git-tree-sha1 = "2d9e14d19bad3f9ad5cc5e4cffabc3cfa59de825"
uuid = "34da2185-b29b-5c13-b0c7-acf172513d20"
version = "1.3.0"
[[DataFrames]]
deps = ["CategoricalArrays", "CodecZlib", "Compat", "DataStreams", "Dates", "InteractiveUtils", "IteratorInterfaceExtensions", "LinearAlgebra", "Missings", "Printf", "Random", "Reexport", "SortingAlgorithms", "Statistics", "StatsBase", "TableTraits", "Tables", "Test", "TranscodingStreams", "Unicode", "WeakRefStrings"]
git-tree-sha1 = "ad34fefb72b18a8dd5c17fab9089d11111b61935"
uuid = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
version = "0.14.1"
[[DataStreams]]
deps = ["Dates", "Missings", "Test", "WeakRefStrings"]
git-tree-sha1 = "69c72a1beb4fc79490c361635664e13c8e4a9548"
uuid = "9a8bc11e-79be-5b39-94d7-1ccc349a1a85"
version = "0.4.1"
[[DataStructures]]
deps = ["InteractiveUtils", "OrderedCollections", "Random", "Serialization", "Test"]
git-tree-sha1 = "8fc6e166e24fda04b2b648d4260cdad241788c54"
uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
version = "0.14.0"
[[Dates]]
deps = ["Printf"]
uuid = "ade2ca70-3891-5945-98fb-dc099432e06a"
[[DelimitedFiles]]
deps = ["Mmap"]
uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab"
[[Distributed]]
deps = ["LinearAlgebra", "Random", "Serialization", "Sockets"]
uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b"
[[Future]]
deps = ["Random"]
uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820"
[[InteractiveUtils]]
deps = ["LinearAlgebra", "Markdown"]
uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
[[IteratorInterfaceExtensions]]
deps = ["Test"]
git-tree-sha1 = "5484e5ede2a4137b9643f4d646e8e7b87b794415"
uuid = "82899510-4779-5014-852e-03e436cf321d"
version = "0.1.1"
[[JSON]]
deps = ["Dates", "Distributed", "Mmap", "Sockets", "Test", "Unicode"]
git-tree-sha1 = "fec8e4d433072731466d37ed0061b3ba7f70eeb9"
uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
version = "0.19.0"
[[LibGit2]]
uuid = "76f85450-5226-5b5a-8eaa-529ad045b433"
[[Libdl]]
uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
[[LinearAlgebra]]
deps = ["Libdl"]
uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
[[Logging]]
uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"
[[Markdown]]
deps = ["Base64"]
uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"
[[Missings]]
deps = ["Dates", "InteractiveUtils", "SparseArrays", "Test"]
git-tree-sha1 = "adc26d2ee85a49c413464110d922cf21efc9d233"
uuid = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28"
version = "0.3.1"
[[Mmap]]
uuid = "a63ad114-7e13-5084-954f-fe012c677804"
[[OrderedCollections]]
deps = ["Random", "Serialization", "Test"]
git-tree-sha1 = "85619a3f3e17bb4761fe1b1fd47f0e979f964d5b"
uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
version = "1.0.2"
[[Pkg]]
deps = ["Dates", "LibGit2", "Markdown", "Printf", "REPL", "Random", "SHA", "UUIDs"]
uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
[[Printf]]
deps = ["Unicode"]
uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7"
[[REPL]]
deps = ["InteractiveUtils", "Markdown", "Sockets"]
uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"
[[Random]]
deps = ["Serialization"]
uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
[[Reexport]]
deps = ["Pkg"]
git-tree-sha1 = "7b1d07f411bc8ddb7977ec7f377b97b158514fe0"
uuid = "189a3867-3050-52da-a836-e630ba90ab69"
version = "0.2.0"
[[Requires]]
deps = ["Test"]
git-tree-sha1 = "f6fbf4ba64d295e146e49e021207993b6b48c7d1"
uuid = "ae029012-a4dd-5104-9daa-d747884805df"
version = "0.5.2"
[[SHA]]
uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce"
[[Serialization]]
uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
[[SharedArrays]]
deps = ["Distributed", "Mmap", "Random", "Serialization"]
uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383"
[[Sockets]]
uuid = "6462fe0b-24de-5631-8697-dd941f90decc"
[[SortingAlgorithms]]
deps = ["DataStructures", "Random", "Test"]
git-tree-sha1 = "03f5898c9959f8115e30bc7226ada7d0df554ddd"
uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c"
version = "0.3.1"
[[SparseArrays]]
deps = ["LinearAlgebra", "Random"]
uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
[[Statistics]]
deps = ["LinearAlgebra", "SparseArrays"]
uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
[[StatsBase]]
deps = ["DataStructures", "LinearAlgebra", "Missings", "Printf", "Random", "SortingAlgorithms", "SparseArrays", "Statistics", "Test"]
git-tree-sha1 = "723193a13e8078cec6dcd0b8fe245c8bfd81690e"
uuid = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
version = "0.25.0"
[[TableTraits]]
deps = ["IteratorInterfaceExtensions", "Test"]
git-tree-sha1 = "da062a2c31f16178f68190243c24140801720a43"
uuid = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c"
version = "0.4.0"
[[Tables]]
deps = ["Requires", "Test"]
git-tree-sha1 = "be3a3a28a1e6c4fdd838bdf21e796f7a592c565c"
uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c"
version = "0.1.10"
[[Test]]
deps = ["Distributed", "InteractiveUtils", "Logging", "Random"]
uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
[[TranscodingStreams]]
deps = ["Pkg", "Random", "Test"]
git-tree-sha1 = "a34a2d588e2d2825602bf14a24216d5c8b0921ec"
uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa"
version = "0.8.1"
[[UUIDs]]
deps = ["Random"]
uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
[[Unicode]]
uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"
[[WeakRefStrings]]
deps = ["Missings", "Random", "Test"]
git-tree-sha1 = "1087e8be380f2c8b96434b02bb1150fc1c511135"
uuid = "ea10d353-3f73-51f8-a26c-33c1cb351aa5"
version = "0.5.3"
[deps]
Cassette = "7057c7e9-c182-5462-911a-8362d720325c"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
using Test, Cassette, DataFrames
f() = 1
Cassette.@context MockCtx
Cassette.execute(ctx::MockCtx, ::typeof(f)) = ctx.metadata
Cassette.@overdub MockCtx(metadata=DataFrame(a="str", b=[3])) begin
@test f() == DataFrame(a="str", b=[2])
end
$ julia --project test.jl
Error During Test at C:\Users\sbyrne\Documents\git\cassette\test.jl:9
Test threw exception
Expression: f() == DataFrame(a="str", b=[2])
ArgumentError: input string is empty or only contains whitespace
Stacktrace:
[1] tryparse_internal at C:\Users\sbyrne\.julia\packages\Cassette\XwZ3M\src\context.jl:441 [inlined]
[2] overdub(::Cassette.Context{nametype(MockCtx),DataFrame,Cassette.NoPass,Nothing,Nothing}, ::typeof(Base.tryparse_internal), ::Type{Int64}, ::String, ::Int64, ::Int64, ::Int64, ::Bool) at C:\Users\sbyrne\.julia\packages\Cassette\XwZ3M\src\overdub.jl:0
[3] #parse#333 at .\parse.jl:225 [inlined]
[4] overdub(::Cassette.Context{nametype(MockCtx),DataFrame,Cassette.NoPass,Nothing,Nothing}, ::getfield(Base, Symbol("##parse#333")), ::Nothing, ::typeof(parse), ::Type{Int64}, ::String) at C:\Users\sbyrne\.julia\packages\Cassette\XwZ3M\src\overdub.jl:0
[5] parse at .\parse.jl:225 [inlined]
[6] overdub(::Cassette.Context{nametype(MockCtx),DataFrame,Cassette.NoPass,Nothing,Nothing}, ::typeof(parse), ::Type{Int64}, ::String) at C:\Users\sbyrne\.julia\packages\Cassette\XwZ3M\src\overdub.jl:0
[7] displaysize at .\stream.jl:380 [inlined]
[8] overdub(::Cassette.Context{nametype(MockCtx),DataFrame,Cassette.NoPass,Nothing,Nothing}, ::typeof(displaysize)) at C:\Users\sbyrne\.julia\packages\Cassette\XwZ3M\src\overdub.jl:0
[9] displaysize at .\stream.jl:379 [inlined]
[10] overdub(::Cassette.Context{nametype(MockCtx),DataFrame,Cassette.NoPass,Nothing,Nothing}, ::typeof(displaysize), ::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}) at C:\Users\sbyrne\.julia\packages\Cassette\XwZ3M\src\overdub.jl:0
[11] #show#190 at C:\Users\sbyrne\.julia\packages\DataFrames\1PqZ3\src\abstractdataframe\show.jl:550 [inlined]
[12] overdub(::Cassette.Context{nametype(MockCtx),DataFrame,Cassette.NoPass,Nothing,Nothing}, ::getfield(DataFrames, Symbol("##show#190")), ::Bool, ::Bool, ::Bool, ::Symbol, ::Bool, ::typeof(show), ::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::DataFrame) at C:\Users\sbyrne\.julia\packages\Cassette\XwZ3M\src\overdub.jl:0
[13] overdub(::Cassette.Context{nametype(MockCtx),DataFrame,Cassette.NoPass,Nothing,Nothing}, ::typeof(show), ::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::DataFrame) at C:\Users\sbyrne\.julia\packages\DataFrames\1PqZ3\src\abstractdataframe\show.jl:549
[14] show_unquoted at .\show.jl:753 [inlined]
[15] overdub(::Cassette.Context{nametype(MockCtx),DataFrame,Cassette.NoPass,Nothing,Nothing}, ::typeof(Base.show_unquoted), ::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::DataFrame, ::Int64, ::Int64) at C:\Users\sbyrne\.julia\packages\Cassette\XwZ3M\src\overdub.jl:0
[16] show_list at .\show.jl:947 [inlined]
[17] overdub(::Cassette.Context{nametype(MockCtx),DataFrame,Cassette.NoPass,Nothing,Nothing}, ::typeof(Base.show_list), ::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::Array{Any,1}, ::String, ::Int64, ::Int64, ::Bool) at C:\Users\sbyrne\.julia\packages\Cassette\XwZ3M\src\overdub.jl:0
[18] show_list at .\show.jl:935 [inlined]
[19] overdub(::Cassette.Context{nametype(MockCtx),DataFrame,Cassette.NoPass,Nothing,Nothing}, ::typeof(Base.show_list), ::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::Array{Any,1}, ::String, ::Int64, ::Int64) at C:\Users\sbyrne\.julia\packages\Cassette\XwZ3M\src\overdub.jl:0
[20] show_unquoted at .\show.jl:1246 [inlined]
[21] overdub(::Cassette.Context{nametype(MockCtx),DataFrame,Cassette.NoPass,Nothing,Nothing}, ::typeof(Base.show_unquoted), ::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::Expr, ::Int64, ::Int64) at C:\Users\sbyrne\.julia\packages\Cassette\XwZ3M\src\overdub.jl:0
[22] print at .\show.jl:749 [inlined]
[23] overdub(::Cassette.Context{nametype(MockCtx),DataFrame,Cassette.NoPass,Nothing,Nothing}, ::typeof(print), ::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::Expr) at C:\Users\sbyrne\.julia\packages\Cassette\XwZ3M\src\overdub.jl:0
[24] #13 at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\Test\src\Test.jl:268 [inlined]
[25] overdub(::Cassette.Context{nametype(MockCtx),DataFrame,Cassette.NoPass,Nothing,Nothing}, ::getfield(Test, Symbol("##13#16")), ::Base.GenericIOBuffer{Array{UInt8,1}}) at C:\Users\sbyrne\.julia\packages\Cassette\XwZ3M\src\overdub.jl:0
[26] overdub at C:\Users\sbyrne\.julia\packages\Cassette\XwZ3M\src\overdub.jl:430 [inlined]
[27] #sprint#325 at .\strings\io.jl:101 [inlined]
[28] overdub(::Cassette.Context{nametype(MockCtx),DataFrame,Cassette.NoPass,Nothing,Nothing}, ::getfield(Base, Symbol("##sprint#325")), ::Nothing, ::Int64, ::typeof(sprint), ::getfield(Test, Symbol("##13#16"))) at C:\Users\sbyrne\.julia\packages\Cassette\XwZ3M\src\overdub.jl:0
[29] overdub at C:\Users\sbyrne\.julia\packages\Cassette\XwZ3M\src\overdub.jl:430 [inlined]
[30] sprint at .\strings\io.jl:97 [inlined]
[31] eval_test at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\Test\src\Test.jl:266 [inlined]
[32] overdub(::Cassette.Context{nametype(MockCtx),DataFrame,Cassette.NoPass,Nothing,Nothing}, ::typeof(Test.eval_test), ::Expr, ::Expr, ::LineNumberNode) at C:\Users\sbyrne\.julia\packages\Cassette\XwZ3M\src\overdub.jl:0
[33] macro expansion at C:\Users\sbyrne\Documents\git\cassette\test.jl:9 [inlined]
[34] overdub(::Cassette.Context{nametype(MockCtx),DataFrame,Cassette.NoPass,Nothing,Nothing}, ::getfield(Main, Symbol("##4#5"))) at C:\Users\sbyrne\.julia\packages\Cassette\XwZ3M\src\overdub.jl:490
[35] top-level scope at none:0
[36] include at .\boot.jl:317 [inlined]
[37] include_relative(::Module, ::String) at .\loading.jl:1041
[38] include(::Module, ::String) at .\sysimg.jl:29
[39] exec_options(::Base.JLOptions) at .\client.jl:229
[40] _start() at .\client.jl:421
ERROR: LoadError: There was an error during testing
in expression starting at C:\Users\sbyrne\Documents\git\cassette\test.jl:8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment