Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for mocking calls with keyword arguments #19

Closed
rofinn opened this issue Jun 13, 2017 · 0 comments
Closed

Support for mocking calls with keyword arguments #19

rofinn opened this issue Jun 13, 2017 · 0 comments

Comments

@rofinn
Copy link
Collaborator

rofinn commented Jun 13, 2017

The following throws an error because the @mock macro tries to put all expr.args[2:end] into a tuple (or doesn't correctly distinguish args and kwargs).

Example)

@mock pipeline(`ls -al`, stderr=DevNull)

throws the following error

julia --compilecache=no -e 'Pkg.test("MyPkg")'
INFO: Testing MyPkg
MyPkg: Error During Test
  Got an exception of type LoadError outside of a @test
  LoadError: function tuple does not accept keyword arguments
   in kwfunc(::Any) at ./boot.jl:236
   in macro expansion at /Users/rory/.playground/share/test/packages/v0.5/Mocking/src/Mocking.jl:191 [inlined]
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant