[issue35753] Importing call from unittest.mock directly causes ValueError

2021-07-18 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: -25778 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue35753] Importing call from unittest.mock directly causes ValueError

2021-07-18 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +25778 pull_request: https://github.com/python/cpython/pull/27228 ___ Python tracker ___ ___

[issue35753] Importing call from unittest.mock directly causes ValueError

2021-05-05 Thread Łukasz Langa
Łukasz Langa added the comment: Fixed in 3.10 and 3.11, thanks Albert for your patch. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10, Python 3.11 -Python 3.7 ___ Python tracker

[issue35753] Importing call from unittest.mock directly causes ValueError

2021-05-05 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 10d6f6bfd749c0e7da51a96f53ca326c336f7a00 by Miss Islington (bot) in branch '3.10': bpo-35753: Fix crash in doctest with unwrap-able functions (GH-22981) (#25926) https://github.com/python/cpython/commit/10d6f6bfd749c0e7da51a96f53ca326c336f7a00 --

[issue35753] Importing call from unittest.mock directly causes ValueError

2021-05-05 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +24593 pull_request: https://github.com/python/cpython/pull/25926 ___ Python tracker _

[issue35753] Importing call from unittest.mock directly causes ValueError

2021-03-14 Thread Alfred Perlstein
Alfred Perlstein added the comment: I have a patch here that fixes this: https://github.com/python/cpython/pull/22981 It simply swallows the unwrap exception making doctest immune to such buggy objects. Can someone help it get reviewed please? -- __

[issue35753] Importing call from unittest.mock directly causes ValueError

2020-10-25 Thread Alfred Perlstein
Change by Alfred Perlstein : -- pull_requests: +21898 pull_request: https://github.com/python/cpython/pull/22981 ___ Python tracker ___

[issue35753] Importing call from unittest.mock directly causes ValueError

2020-10-20 Thread David Antonini
David Antonini added the comment: Somehow I missed the follow up here until now. I don't remember the original code, but I'm fairly confident that mocked_print is the patched print function eg with patch('dionysus_app.class_functions.print') as mocked_print: Probably solved in this commit d

[issue35753] Importing call from unittest.mock directly causes ValueError

2020-10-20 Thread Alfred Perlstein
Change by Alfred Perlstein : -- keywords: +patch nosy: +splbio nosy_count: 4.0 -> 5.0 pull_requests: +21788 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/22834 ___ Python tracker

[issue35753] Importing call from unittest.mock directly causes ValueError

2019-05-26 Thread ppperry
Change by ppperry : -- nosy: -ppperry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.or

[issue35753] Importing call from unittest.mock directly causes ValueError

2019-05-26 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: > The actual bug appears to be "doctest can't run on a module that contains > un-unwrappable objects" Is it the below example scenario being discussed in the issue? Since call is imported it's also present in obj.__dict__ and hence trying to unwrap

[issue35753] Importing call from unittest.mock directly causes ValueError

2019-05-26 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: duplicate -> status: closed -> open ___ Python tracker ___ ___ Python-bugs-list ma

[issue35753] Importing call from unittest.mock directly causes ValueError

2019-05-23 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue35753] Importing call from unittest.mock directly causes ValueError

2019-05-23 Thread ppperry
ppperry added the comment: Indeed, you are right that this should be reopened. -- ___ Python tracker ___ ___ Python-bugs-list maili

[issue35753] Importing call from unittest.mock directly causes ValueError

2019-05-23 Thread Thomas Hisch
Thomas Hisch added the comment: I think this tickt needs to be reopened, because > The actual bug appears to be "doctest can't run on a module that contains > un-unwrappable objects" @ppperry Or do you already know where this issue is tracked? -- nosy: +Thomas Hisch ___

[issue35753] Importing call from unittest.mock directly causes ValueError

2019-01-16 Thread ppperry
ppperry added the comment: Sorry, looks like I was wrong about it being a duplicate. The actual bug appears to be "doctest can't run on a module that contains un-unwrappable objects", which there probably is an issue for but I don't know what it is. -- __

[issue35753] Importing call from unittest.mock directly causes ValueError

2019-01-16 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Indeed, closed as duplicate of https://bugs.python.org/issue25532 -- resolution: -> duplicate stage: -> resolved status: open -> closed ___ Python tracker _

[issue35753] Importing call from unittest.mock directly causes ValueError

2019-01-16 Thread ppperry
ppperry added the comment: According to the error message, this is a duplicate of https://bugs.python.org/issue25532 -- nosy: +ppperry ___ Python tracker ___

[issue35753] Importing call from unittest.mock directly causes ValueError

2019-01-16 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Hi David, Can you provide a full reproducer? In your example, mocked_print is undefined. Please, provide a self-contained script that can be executed to test the behaviour. -- nosy: +pablogsal ___ Python t

[issue35753] Importing call from unittest.mock directly causes ValueError

2019-01-16 Thread David Antonini
David Antonini added the comment: Apologies for initial malformed message, I hit submit prematurely. -- ___ Python tracker ___ ___

[issue35753] Importing call from unittest.mock directly causes ValueError

2019-01-16 Thread David Antonini
David Antonini added the comment: I'm having a problem with mock.call when I import it directly from unittest.mock. When I do: from unittest.mock import patch, mock_open, call mocked_print.assert_has_calls([ call("first print"), call("second print"), ]) I get: C:\Program File

[issue35753] Importing call from unittest.mock directly causes ValueError

2019-01-16 Thread David Antonini
New submission from David Antonini : Ok so that's a pretty odd bug. I already had from unittest.mock import patch, mock_open so I simply modified that to from instead of doing mock.call in my test. Changing this to from unittest import mock and then mock.call fixed the error. from unittest.