Staging
v0.5.1
https://github.com/python/cpython
Revision f668d2b775da4bcd07e142c4bc5ebd88165fadf4 authored by Miss Islington (bot) on 17 September 2019, 11:35:56 UTC, committed by GitHub on 17 September 2019, 11:35:56 UTC

In the format string for assert_called the evaluation order is incorrect and hence for mock's without name, 'None' is printed whereas it should be 'mock' like for other messages. The error message is ("Expected '%s' to have been called." % self._mock_name or 'mock').
(cherry picked from commit 5f5f11faf9de0d8dcbe1a8a4eb35d2a4232d6eaa)

Co-authored-by: Abraham Toriz Cruz <awonderfulcode@gmail.com>
1 parent 728bea6
Raw File
Tip revision: f668d2b775da4bcd07e142c4bc5ebd88165fadf4 authored by Miss Islington (bot) on 17 September 2019, 11:35:56 UTC
bpo-37828: Fix default mock_name in unittest.mock.assert_called error (GH-16166)
Tip revision: f668d2b
_testinternalcapi.vcxproj.filters
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <ItemGroup>
    <Filter Include="Source Files">
      <UniqueIdentifier>{136fc5eb-7fe4-4486-8c6d-b49f37a00199}</UniqueIdentifier>
    </Filter>
  </ItemGroup>
  <ItemGroup>
    <ClCompile Include="..\Modules\_testinternalcapi.c">
      <Filter>Source Files</Filter>
    </ClCompile>
  </ItemGroup>
</Project>
back to top