This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author xdegaye
Recipients jafo, miss-islington, paul.moore, shireenrao, steve.dower, terry.reedy, tim.golden, xdegaye, zach.ware
Date 2019-11-18.21:43:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1574113427.95.0.661544736766.issue25172@roundup.psfhosted.org>
In-reply-to
Content
test_crypt fails on android following last changes made at 243a73deee4ac61fe06602b7ed56b6df01e19f27.
The android libc does not have a crypt() function and the _crypt module is not built.


generic_x86_64:/data/local/tmp/python $ python
Python 3.9.0a0 (heads/abifa-dirty:cf805c25e6, Nov 18 2019, 16:40:26)
[Clang 8.0.2 (https://android.googlesource.com/toolchain/clang 40173bab62ec7462 on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import crypt
Traceback (most recent call last):
  File "/data/local/tmp/python/lib/python3.9/crypt.py", line 6, in <module>
    import _crypt
ModuleNotFoundError: No module named '_crypt'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/data/local/tmp/python/lib/python3.9/crypt.py", line 11, in <module>
    raise ImportError("The required _crypt module was not built as part of CPython")
ImportError: The required _crypt module was not built as part of CPython
>>>


generic_x86_64:/data/local/tmp/python $ python -m test -v test_crypt
== CPython 3.9.0a0 (heads/abifa-dirty:cf805c25e6, Nov 18 2019, 16:40:26) [Clang 8.0.2 (https://andro
id.googlesource.com/toolchain/clang 40173bab62ec7462
== Linux-3.10.0+-x86_64-with-libc little-endian
== cwd: /data/local/tmp/python/tmp/test_python_3523
== CPU count: 2
== encodings: locale=UTF-8, FS=utf-8
0:00:00 Run tests sequentially
0:00:00 [1/1] test_crypt
test_blowfish_rounds (test.test_crypt.CryptTestCase) ... skipped 'Not supported on Windows'
test_crypt (test.test_crypt.CryptTestCase) ... skipped 'Not supported on Windows'
test_invalid_rounds (test.test_crypt.CryptTestCase) ... skipped 'Not supported on Windows'
test_methods (test.test_crypt.CryptTestCase) ... skipped 'Not supported on Windows'
test_salt (test.test_crypt.CryptTestCase) ... skipped 'Not supported on Windows'
test_saltedcrypt (test.test_crypt.CryptTestCase) ... skipped 'Not supported on Windows'
test_sha2_rounds (test.test_crypt.CryptTestCase) ... skipped 'Not supported on Windows'
test_failure_only_for_windows (test.test_crypt.TestWhyCryptDidNotImport) ... FAIL
test_import_failure_message (test.test_crypt.TestWhyCryptDidNotImport) ... FAIL

======================================================================
FAIL: test_failure_only_for_windows (test.test_crypt.TestWhyCryptDidNotImport)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/data/local/tmp/python/lib/python3.9/test/test_crypt.py", line 16, in test_failure_only_for_
windows
    self.assertEqual(sys.platform, 'win32')
AssertionError: 'linux' != 'win32'
- linux
+ win32

======================================================================
FAIL: test_import_failure_message (test.test_crypt.TestWhyCryptDidNotImport)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/data/local/tmp/python/lib/python3.9/test/test_crypt.py", line 19, in test_import_failure_message
    self.assertIn('not supported', IMPORT_ERROR)
AssertionError: 'not supported' not found in 'The required _crypt module was not built as part of CPython'

----------------------------------------------------------------------

Ran 9 tests in 0.008s

FAILED (failures=2, skipped=7)
test test_crypt failed
test_crypt failed

== Tests result: FAILURE ==

1 test failed:
    test_crypt

Total duration: 165 ms
Tests result: FAILURE
History
Date User Action Args
2019-11-18 21:43:48xdegayesetrecipients: + xdegaye, terry.reedy, paul.moore, jafo, tim.golden, zach.ware, steve.dower, miss-islington, shireenrao
2019-11-18 21:43:47xdegayesetmessageid: <1574113427.95.0.661544736766.issue25172@roundup.psfhosted.org>
2019-11-18 21:43:47xdegayelinkissue25172 messages
2019-11-18 21:43:47xdegayecreate