[issue25755] Test test_property failed if run twice

2015-12-11 Thread Berker Peksag

Berker Peksag added the comment:

Thanks for the patch, Nan. I've updated your patch to apply Serhiy's advice.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25755] Test test_property failed if run twice

2015-12-11 Thread Roundup Robot

Roundup Robot added the comment:

New changeset cc1aa0e88626 by Berker Peksag in branch '3.5':
Issue #25755: Move PropertyWritableDoc into the test case
https://hg.python.org/cpython/rev/cc1aa0e88626

New changeset 8f52c9d72d9f by Berker Peksag in branch 'default':
Issue #25755: Move PropertyWritableDoc into the test case
https://hg.python.org/cpython/rev/8f52c9d72d9f

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25755] Test test_property failed if run twice

2015-12-05 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Or move the definition of the class to testing method.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25755] Test test_property failed if run twice

2015-12-04 Thread Martin Panter

Martin Panter added the comment:

Maybe it would be even better to wrap this up using 
unittest.mock.patch.object(). That is an obscure function that is hard to learn 
from the documentation, but very useful for testing. There is also 
test.support.swap_attr(), which is easier to figure out. Something like:

with patch.object(sub.__class__.spam, '__doc__', 'Spam'):
self.assertEqual(sub.__class__.spam.__doc__, 'Spam')

--
nosy: +martin.panter
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25755] Test test_property failed if run twice

2015-12-03 Thread Nan Wu

Nan Wu added the comment:

Thanks for catching this failure. In the patch, property doc is restore after 
write operation.

--
nosy: +Nan Wu
Added file: 
http://bugs.python.org/file41233/fix_test_property_doc_writable_patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25755] Test test_property failed if run twice

2015-11-27 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

$ ./python -m test.regrtest test_property test_property
[1/2] test_property
[2/2] test_property
test test_property failed -- Traceback (most recent call last):
  File "/home/serhiy/py/cpython-debug/Lib/test/test_property.py", line 172, in 
test_property_decorator_doc_writable
self.assertEqual(sub.__class__.spam.__doc__, 'Eggs')
AssertionError: 'Spam' != 'Eggs'
- Spam
+ Eggs


1 test OK.
1 test failed:
test_property

--
components: Tests
messages: 255493
nosy: serhiy.storchaka
priority: normal
severity: normal
status: open
title: Test test_property failed if run twice
type: behavior
versions: Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25755] Test test_property failed if run twice

2015-11-27 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

As result the test is failed in leaks searching mode.

$ ./python -m test.regrtest -uall -R 3:3 test_property
[1/1] test_property
beginning 6 repetitions
123456
test test_property failed -- Traceback (most recent call last):
  File "/home/serhiy/py/cpython-debug/Lib/test/test_property.py", line 172, in 
test_property_decorator_doc_writable
self.assertEqual(sub.__class__.spam.__doc__, 'Eggs')
AssertionError: 'Spam' != 'Eggs'
- Spam
+ Eggs


1 test failed:
test_property

--
nosy: +berker.peksag, rhettinger

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com