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
Allow monkey patching of methods already implemented by sure #19
Comments
So, currently, we can't do that cause the |
oh, so you're saying that if the implementation wasn't through |
Yes, I think so. But I'm afraid that we need that to use properties! I'll double check to be sure |
Yes, that's true.
I think that this issue could be related to #74 and maybe #44 (didn't had a look at this one yet) as well. |
…lfalcao#19 This allows overwriting of the monkey-patched properties by sure in cpython: ```python from sure import AssertionBuilder class Foo(object): pass instance = Foo() instance.do = "anything" instance.do.should.be.equal("anything") instance2 = Foo() instance2.do.__class__.should.be.equal(AssertionBuilder) ``` This test would pass.
…lfalcao#19 This allows overwriting of the monkey-patched properties by sure in cpython: ```python from sure import AssertionBuilder class Foo(object): pass instance = Foo() instance.do = "anything" instance.do.should.be.equal("anything") instance2 = Foo() instance2.do.__class__.should.be.equal(AssertionBuilder) ``` This test would pass.
…lfalcao#19 This allows overwriting of the monkey-patched properties by sure in cpython: ```python from sure import AssertionBuilder class Foo(object): pass instance = Foo() instance.do = "anything" instance.do.should.be.equal("anything") instance2 = Foo() instance2.do.__class__.should.be.equal(AssertionBuilder) ``` This test would pass.
…lfalcao#19, gabrielfalcao#74 This allows overwriting of the monkey-patched properties by sure in cpython: ```python from sure import AssertionBuilder class Foo(object): pass instance = Foo() instance.do = "anything" instance.do.should.be.equal("anything") instance2 = Foo() instance2.do.__class__.should.be.equal(AssertionBuilder) ``` This test would pass.
…lfalcao#19, gabrielfalcao#74 This allows overwriting of the monkey-patched properties by sure in cpython: ```python from sure import AssertionBuilder class Foo(object): pass instance = Foo() instance.do = "anything" instance.do.should.be.equal("anything") instance2 = Foo() instance2.do.__class__.should.be.equal(AssertionBuilder) ``` This test would pass.
…lfalcao#19, gabrielfalcao#74 This allows overwriting of the monkey-patched properties by sure in cpython: ```python from sure import AssertionBuilder class Foo(object): pass instance = Foo() instance.do = "anything" instance.do.should.be.equal("anything") instance2 = Foo() instance2.do.__class__.should.be.equal(AssertionBuilder) ``` This test would pass.
Sure should allow overwritting the
do
,does
and all the other methods (see below) when using the CPython-compatible syntax sugar (i.e.:(1).should.be.an(int)
)do
do_not
does
does_not
doesnt
should
should_not
shouldnt
must
For instance, this test should pass:
The text was updated successfully, but these errors were encountered: