jsatt / mock

Automatically exported from code.google.com/p/mock
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

Default value for __len__ on MagicMock type in documentation #208

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
In the documentation here: 
http://www.voidspace.org.uk/python/mock/magicmock.html#mock.NonCallableMagicMock

The default return value for __len__ for a MagicMock is stated incorrectly as 
1, it is actually 0, as is confirmed in the code example that immediately 
follows in the documentation.

         __contains__ : False
    >>__len__ : 1
         __iter__ : iter([])

Original issue reported on code.google.com by stca...@gmail.com on 27 Jul 2013 at 5:48