Title: Test6012 in test_capi is not run as part of make test
Type: Stage: resolved
Components: Tests Versions: Python 2.7
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: ZackerySpytz, serhiy.storchaka, xtreak
Priority: normal Keywords: patch

Created on 2018-07-26 13:42 by xtreak, last changed 2018-08-06 13:48 by serhiy.storchaka. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 8681 merged ZackerySpytz, 2018-08-05 21:15
Messages (3)
msg322423 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python committer) Date: 2018-07-26 13:42
Test6012 is not run as part of make test since it's not added to support.run_unittest at the end of the file. Hence running the test as a single file causes error. It seems argparsing related test which is a part of _testcapi.module.c in Python 3 branch was not cleanly backported and I tried backporting it but it requires PyUnicode_FSConverter which I think is Python 3 only. Since the test was not running during make test there was no error about this during backporting during merge.

Relevant backport commit : ef19fd200d0768919f1658466f8b6080b191fba0

# No argparsing defined in _testcapimodule.c

➜  cpython git:(1c8f655) grep -inr argparsing *
Lib/test/        self.assertEqual(_testcapi.argparsing("Hello", "World"), 1)
➜  cpython git:(1c8f655) grep -inr PyUnicode_FSConverter *

# Test case failure

➜  cpython git:(1c8f655) ./python -m unittest -v test.test_capi
test_buildvalue_N (test.test_capi.CAPITest) ... ok
test_bad_use (test.test_capi.SkipitemTest) ... ok
test_parse_tuple_and_keywords (test.test_capi.SkipitemTest) ... ok
test_skipitem (test.test_capi.SkipitemTest) ... ok
test_skipitem_with_suffix (test.test_capi.SkipitemTest) ... ok
test (test.test_capi.Test6012) ... ERROR
test_pendingcalls_non_threaded (test.test_capi.TestPendingCalls) ... ok
test_pendingcalls_threaded (test.test_capi.TestPendingCalls) ... ok
test_thread_state (test.test_capi.TestThreadState) ... ok

ERROR: test (test.test_capi.Test6012)
Traceback (most recent call last):
  File "/home/cpython/Lib/test/", line 108, in test
    self.assertEqual(_testcapi.argparsing("Hello", "World"), 1)
AttributeError: 'module' object has no attribute 'argparsing'

Ran 9 tests in 2.753s

FAILED (errors=1)

# Test passes because Test6012 is not added to support.run_unittest

➜  cpython git:(1c8f655) ./python Lib/test/
internal test_L_code
internal test_broken_memoryview
internal test_buildvalue_N
internal test_capsule
internal test_config
internal test_datetime_capi
internal test_dict_iteration
internal test_empty_argparse
internal test_from_contiguous
internal test_k_code
internal test_lazy_hash_inheritance
internal test_list_api
internal test_long_and_overflow
internal test_long_api
internal test_long_long_and_overflow
internal test_long_numbits
internal test_longlong_api
internal test_null_strings
internal test_string_from_format
internal test_to_contiguous
internal test_u_code
internal test_widechar
internal test_with_docstring
test_buildvalue_N (__main__.CAPITest) ... ok
test_pendingcalls_non_threaded (__main__.TestPendingCalls) ... ok
test_pendingcalls_threaded (__main__.TestPendingCalls) ... ok
test_bad_use (__main__.SkipitemTest) ... ok
test_parse_tuple_and_keywords (__main__.SkipitemTest) ... ok
test_skipitem (__main__.SkipitemTest) ... ok
test_skipitem_with_suffix (__main__.SkipitemTest) ... ok
test_thread_state (__main__.TestThreadState) ... ok

Ran 8 tests in 2.741s


Adding serhiy.storchaka who did the relevant backport.

msg323205 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2018-08-06 13:47
New changeset 7e4ff9796cb2c5b64307a2bd928e35930e3f1b2a by Serhiy Storchaka (Zackery Spytz) in branch '2.7':
[2.7] bpo-34236: Remove mistakenly backported Test6012 in (GH-8681)
msg323206 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2018-08-06 13:48
Thanks Karthikeyan and Zackery!
Date User Action Args
2018-08-06 13:48:27serhiy.storchakasetstatus: open -> closed
resolution: fixed
messages: + msg323206

stage: patch review -> resolved
2018-08-06 13:47:52serhiy.storchakasetmessages: + msg323205
2018-08-05 21:17:11ZackerySpytzsetnosy: + ZackerySpytz
components: + Tests, - Build
2018-08-05 21:15:14ZackerySpytzsetkeywords: + patch
stage: patch review
pull_requests: + pull_request8176
2018-07-26 13:42:17xtreakcreate