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

fix optionspattern #1113

Merged
merged 6 commits into from
Jan 17, 2021
Merged

fix optionspattern #1113

merged 6 commits into from
Jan 17, 2021

Conversation

mmatera
Copy link
Contributor

@mmatera mmatera commented Jan 16, 2021

No description provided.

@mmatera mmatera requested a review from a team January 17, 2021 00:33
Copy link
Member

@rocky rocky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rocky
Copy link
Member

rocky commented Jan 17, 2021

Let's do it!

@rocky rocky merged commit e1f6f02 into master Jan 17, 2021
@rocky
Copy link
Member

rocky commented Jan 17, 2021

@mmatera I am now seeing this failure on master. I am not sure why we are not seeing it in CI:

========================================= FAILURES ==========================================
_____________________________________ test_optionvalues _____________________________________

    def test_optionvalues():
        session.evaluate("ClearAll[q];ClearAll[a];ClearAll[s]; Options[f1]:={q->12}")
        session.evaluate("f1[x_,OptionsPattern[]]:=x^OptionValue[q]")
        result =  session.evaluate('f1[y]')
        expected = session.evaluate('y ^ 12')
        assert(result == expected)
    
        session.evaluate("Options[f2]:={s->12}")
        session.evaluate("f2[x_,opt:OptionsPattern[]]:=x^OptionValue[s]")
        result =  session.evaluate('f2[y]')
        expected = session.evaluate('y ^ 12')
       #^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>       assert(result == expected)
E       assert <Expression: System`Power[Global`y, System`OptionValue[Global`s]]> == <Expression: System`Power[Global`y, 12]>

@mmatera
Copy link
Contributor Author

mmatera commented Jan 17, 2021

That is one of the things I was trying to solve with this PR. I am going to investigate it.

@rocky
Copy link
Member

rocky commented Jan 17, 2021

That is one of the things I was trying to solve with this PR. I am going to investigate it.

Ok. Then since it has been merged to master, let's comment out the failing test, and here you can continue to work on that and then merge in the remaining part.

Sorry for hitting the merge button too soon.

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

Successfully merging this pull request may close these issues.

None yet

2 participants