@property methods do not result in generated test cases
NextDesign1 opened this issue · comments
John Mather commented
Hi Chris,
Running the following:
import auger
class PropertyTest(object):
def __init__(self, foo):
self.bar = foo
@property
def first_prop(self):
return self.bar[0]
def first_func(self):
return self.bar[0]
with auger.magic([PropertyTest]):
p = PropertyTest('Test')
print p.first_prop
print p.first_func()
Results in the following generated test cases:
import __main__
import auger
import scratchpad
from scratchpad import PropertyTest
import unittest
class ScratchpadTest(unittest.TestCase):
def test_first_func(self):
propertytest_instance = PropertyTest('Test')
self.assertEquals(
propertytest_instance.first_func(),
'T'
)
if __name__ == "__main__":
unittest.main()
Note that first_func is tested, however first_prop is not. This was generated using auger 0.1.29.
Chris Laffra commented
Merged your pull request and published on PyPi as v 0.1.30
John Mather commented
Hi Chris, thanks for that. I'm not seeing it on PyPi however. It still lists the latest version as 0.1.29. Github has been having some issues in the last few days, so perhaps it got lost in the ether?
Chris Laffra commented
I uploaded, double-checked, and verified it's now actually showing 0.1.30.
John Mather commented
Confirmed. Thanks Chris!
Chris Laffra commented
I double-checked and it's now showing 0.1.30.
…On Monday, October 22, 2018, John Mather ***@***.***> wrote:
Hi Chris, thanks for that. I'm not seeing it on PyPi however. It still
lists the latest version as 0.1.29. Github has been having some issues in
the last few days, so perhaps it got lost in the ether?
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#8 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ATlwKN88sHOZPTwQNnxVezpBX5drwDsuks5undVFgaJpZM4XwoOH>
.