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

The parameters plugin does not work when using the Such DSL #139

Closed
thedrow opened this issue Dec 3, 2013 · 3 comments · Fixed by #202
Closed

The parameters plugin does not work when using the Such DSL #139

thedrow opened this issue Dec 3, 2013 · 3 comments · Fixed by #202
Labels
Milestone

Comments

@thedrow
Copy link
Member

thedrow commented Dec 3, 2013

Example:

with such.A('foo') as it:
  @it.should('do bar')
  @params(1,2,3)
  def test(case, bar):
    pass

  @it.should('do bar')
  @params(1,2,3)
  def test1(bar):
    pass

Output:

======================================================================
ERROR: A foo should do bar
----------------------------------------------------------------------
TypeError: test() takes exactly 2 arguments (1 given)
----------------------------------------------------------------------
@jpellerin
Copy link
Member

This one is going to be tricky. Maybe the test case generator can copy
function attributes onto the methods in generates? And look at the function
signature to see if the method needs to take more args than just self. That
might work.

On Tue, Dec 3, 2013 at 8:03 AM, Omer Katz notifications@github.com wrote:

Example:

with such.A('foo') as it:
@it.should('do bar')
@params(1,2,3)
def test(case, bar):
pass

@it.should('do bar')
@params(1,2,3)
def test(bar):
pass

Output:

ERROR: A foo

AttributeError: 'function' object has no attribute 'paramsList'


Reply to this email directly or view it on GitHubhttps://github.com//issues/139
.

@thedrow
Copy link
Member Author

thedrow commented Dec 3, 2013

We can restrict the users and say that case is always expected when there are params or even assign them to the case parameter (although it's uglier).

@thedrow
Copy link
Member Author

thedrow commented Dec 4, 2013

It seems that the Such DSL does not raise any events when createTests is being invoked. Could that be the problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants