Skip to content

Combinating composition and conditional operators does not work #41

@jcassee

Description

@jcassee

Not sure if this is expected to work, but I had hoped to combine composition and conditional operators:

from grappa import *

{1: {2: 3}} | should.have.key(1) > should.have.key(2) > should.equal(3)

{1: {2: 3}} | should.have.key(1) > should.all(should.have.key(2) > should.equal(3))
AssertionError: Oops! Something went wrong!

  The following assertion was not satisfied
    subject "Empty" should equal 3

  What we expected
    a value that is equal to "3"

  Difference comparison
    > - Empty
    > + 3

  Where
    File "/home/joost/Ontwikkeling/GoAbout/pacioli/grappa-test.py", line 7, in <module>

     1|   #!/usr/bin/env python
     2|   
     3|   from grappa import *
     4|   
     5|   {1: {2: 3}} | should.have.key(1) > should.have.key(2) > should.equal(3)
     6|   
     7| > {1: {2: 3}} | should.have.key(1) > should.any(should.have.key(2) > should.equal(3))
     8|   

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions