| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
The way mocking is written in these tests, we need to have the underlying function around.
|
@benjaminp Thanks for taking a look at this. Sorry 8 hours in the middle of USA night really isn't enough time to review it though. Did this fix an actual bug you encountered, and if so what was the failure mode? |
Sorry, something went wrong.
|
I didn't expect you to review this at 2:30 AM EST; I just wanted to let you know. The problem is the tests were not properly skipped as intended, so one had, for example, on Windows:
======================================================================
ERROR: test_uuid1_bogus_return_value (test.test_uuid.TestUUID)
----------------------------------------------------------------------
Traceback (most recent call last):
File "D:\buildarea\3.x.ware-win81-release\build\lib\test\test_uuid.py", line 379, in test_uuid1_bogus_return_value
'restype', lambda x: 3):
File "D:\buildarea\3.x.ware-win81-release\build\lib\unittest\mock.py", line 1239, in __enter__
original, local = self.get_original()
File "D:\buildarea\3.x.ware-win81-release\build\lib\unittest\mock.py", line 1213, in get_original
"%s does not have the attribute %r" % (target, name)
AttributeError: None does not have the attribute 'restype'
======================================================================
ERROR: test_uuid1_is_safe (test.test_uuid.TestUUID)
----------------------------------------------------------------------
Traceback (most recent call last):
File "D:\buildarea\3.x.ware-win81-release\build\lib\test\test_uuid.py", line 365, in test_uuid1_is_safe
'restype', lambda x: 0):
File "D:\buildarea\3.x.ware-win81-release\build\lib\unittest\mock.py", line 1239, in __enter__
original, local = self.get_original()
File "D:\buildarea\3.x.ware-win81-release\build\lib\unittest\mock.py", line 1213, in get_original
"%s does not have the attribute %r" % (target, name)
AttributeError: None does not have the attribute 'restype'
======================================================================
ERROR: test_uuid1_is_unsafe (test.test_uuid.TestUUID)
----------------------------------------------------------------------
Traceback (most recent call last):
File "D:\buildarea\3.x.ware-win81-release\build\lib\test\test_uuid.py", line 372, in test_uuid1_is_unsafe
'restype', lambda x: -1):
File "D:\buildarea\3.x.ware-win81-release\build\lib\unittest\mock.py", line 1239, in __enter__
original, local = self.get_original()
File "D:\buildarea\3.x.ware-win81-release\build\lib\unittest\mock.py", line 1213, in get_original
"%s does not have the attribute %r" % (target, name)
AttributeError: None does not have the attribute 'restype'
======================================================================
ERROR: test_uuid1_unknown (test.test_uuid.TestUUID)
----------------------------------------------------------------------
Traceback (most recent call last):
File "D:\buildarea\3.x.ware-win81-release\build\lib\test\test_uuid.py", line 358, in test_uuid1_unknown
'restype', None):
File "D:\buildarea\3.x.ware-win81-release\build\lib\unittest\mock.py", line 1239, in __enter__
original, local = self.get_original()
File "D:\buildarea\3.x.ware-win81-release\build\lib\unittest\mock.py", line 1213, in get_original
"%s does not have the attribute %r" % (target, name)
AttributeError: None does not have the attribute 'restype'
----------------------------------------------------------------------
|
Sorry, something went wrong.
|
It's all good! Thanks for the additional details... and the fix. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
The way mocking is written in these tests, we need to have the underlying function around.