tests fail
Created originally on Bitbucket by Anonymous
Under Python2.7:
======================================================================
ERROR: Failure: AttributeError (missing attribute: '__file__')
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/plugins/manager.py", line 154, in generate
for r in result:
File "/usr/lib/python2.7/dist-packages/nose/plugins/doctests.py", line 238, in loadTestsFromModule
module_file = src(module.__file__)
File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_2.7/build/passlib/registry.py", line 36, in __getattr__
raise AttributeError("missing attribute: %r" % (attr,))
AttributeError: missing attribute: '__file__'
======================================================================
FAIL: Doctest: passlib.context.CryptContext
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/doctest.py", line 2226, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for passlib.context.CryptContext
File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_2.7/build/passlib/context.py", line 1517, in CryptContext
----------------------------------------------------------------------
File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_2.7/build/passlib/context.py", line 1528, in passlib.context.CryptContext
Failed example:
ctx = CryptContext(schemes=[...])
Exception raised:
Traceback (most recent call last):
File "/usr/lib/python2.7/doctest.py", line 1315, in __run
compileflags, 1) in test.globs
File "<doctest passlib.context.CryptContext[0]>", line 1
ctx = CryptContext(schemes=[...])
^
SyntaxError: invalid syntax
Under Python3:
======================================================================
FAIL: Doctest: passlib.context.CryptContext.copy
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/doctest.py", line 2226, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for passlib.context.CryptContext.copy
File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_2.7/build/passlib/context.py", line 1635, in copy
----------------------------------------------------------------------
File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_2.7/build/passlib/context.py", line 1650, in passlib.context.CryptContext.copy
Failed example:
ctx2 = custom_app_context.copy(default="md5_crypt")
Exception raised:
Traceback (most recent call last):
File "/usr/lib/python2.7/doctest.py", line 1315, in __run
compileflags, 1) in test.globs
File "<doctest passlib.context.CryptContext.copy[2]>", line 1, in <module>
ctx2 = custom_app_context.copy(default="md5_crypt")
NameError: name 'custom_app_context' is not defined
----------------------------------------------------------------------
File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_2.7/build/passlib/context.py", line 1653, in passlib.context.CryptContext.copy
Failed example:
ctx1.default_scheme()
Expected:
"sha256_crypt"
Got:
'sha256_crypt'
----------------------------------------------------------------------
File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_2.7/build/passlib/context.py", line 1655, in passlib.context.CryptContext.copy
Failed example:
ctx2.default_scheme()
Exception raised:
Traceback (most recent call last):
File "/usr/lib/python2.7/doctest.py", line 1315, in __run
compileflags, 1) in test.globs
File "<doctest passlib.context.CryptContext.copy[4]>", line 1, in <module>
ctx2.default_scheme()
NameError: name 'ctx2' is not defined
======================================================================
FAIL: Doctest: passlib.context.CryptContext.to_dict
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/doctest.py", line 2226, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for passlib.context.CryptContext.to_dict
File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_2.7/build/passlib/context.py", line 2136, in to_dict
----------------------------------------------------------------------
File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_2.7/build/passlib/context.py", line 2153, in passlib.context.CryptContext.to_dict
Failed example:
ldap_nocrypt_context.to_dict()
Expected:
{'schemes': ['ldap_salted_sha1',
'ldap_salted_md5',
'ldap_sha1',
'ldap_md5',
'ldap_plaintext']}
Got:
{'schemes': ['ldap_salted_sha1', 'ldap_salted_md5', 'ldap_sha1', 'ldap_md5', 'ldap_plaintext']}
======================================================================
FAIL: Doctest: passlib.context.CryptContext.to_string
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/doctest.py", line 2226, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for passlib.context.CryptContext.to_string
File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_2.7/build/passlib/context.py", line 2181, in to_string
----------------------------------------------------------------------
File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_2.7/build/passlib/context.py", line 2198, in passlib.context.CryptContext.to_string
Failed example:
print ldap_nocrypt_context.to_string()
Expected:
[passlib]
schemes = ldap_salted_sha1, ldap_salted_md5, ldap_sha1, ldap_md5, ldap_plaintext
Got:
[passlib]
schemes = ldap_salted_sha1, ldap_salted_md5, ldap_sha1, ldap_md5, ldap_plaintext
<BLANKLINE>
<BLANKLINE>
======================================================================
FAIL: Doctest: passlib.registry.register_crypt_handler_path
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/doctest.py", line 2226, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for passlib.registry.register_crypt_handler_path
File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_2.7/build/passlib/registry.py", line 191, in register_crypt_handler_path
----------------------------------------------------------------------
File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_2.7/build/passlib/registry.py", line 208, in passlib.registry.register_crypt_handler_path
Failed example:
from passlib.registry import registry_crypt_handler_path
Exception raised:
Traceback (most recent call last):
File "/usr/lib/python2.7/doctest.py", line 1315, in __run
compileflags, 1) in test.globs
File "<doctest passlib.registry.register_crypt_handler_path[0]>", line 1, in <module>
from passlib.registry import registry_crypt_handler_path
ImportError: cannot import name registry_crypt_handler_path
----------------------------------------------------------------------
File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_2.7/build/passlib/registry.py", line 209, in passlib.registry.register_crypt_handler_path
Failed example:
registry_crypt_handler_path("myhash", "myapp.helpers")
Exception raised:
Traceback (most recent call last):
File "/usr/lib/python2.7/doctest.py", line 1315, in __run
compileflags, 1) in test.globs
File "<doctest passlib.registry.register_crypt_handler_path[1]>", line 1, in <module>
registry_crypt_handler_path("myhash", "myapp.helpers")
NameError: name 'registry_crypt_handler_path' is not defined
----------------------------------------------------------------------
File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_2.7/build/passlib/registry.py", line 214, in passlib.registry.register_crypt_handler_path
Failed example:
from passlib.registry import registry_crypt_handler_path
Exception raised:
Traceback (most recent call last):
File "/usr/lib/python2.7/doctest.py", line 1315, in __run
compileflags, 1) in test.globs
File "<doctest passlib.registry.register_crypt_handler_path[2]>", line 1, in <module>
from passlib.registry import registry_crypt_handler_path
ImportError: cannot import name registry_crypt_handler_path
----------------------------------------------------------------------
File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_2.7/build/passlib/registry.py", line 215, in passlib.registry.register_crypt_handler_path
Failed example:
registry_crypt_handler_path("myhash", "myapp.helpers:MyHash")
Exception raised:
Traceback (most recent call last):
File "/usr/lib/python2.7/doctest.py", line 1315, in __run
compileflags, 1) in test.globs
File "<doctest passlib.registry.register_crypt_handler_path[3]>", line 1, in <module>
registry_crypt_handler_path("myhash", "myapp.helpers:MyHash")
NameError: name 'registry_crypt_handler_path' is not defined
======================================================================
FAIL: Doctest: passlib.utils.pbkdf2.get_prf
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/doctest.py", line 2226, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for passlib.utils.pbkdf2.get_prf
File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_2.7/build/passlib/utils/pbkdf2.py", line 205, in get_prf
----------------------------------------------------------------------
File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_2.7/build/passlib/utils/pbkdf2.py", line 236, in passlib.utils.pbkdf2.get_prf
Failed example:
hmac_sha256
Expected:
<function hmac_sha256 at 0x1e37c80>
Got:
<function hmac_sha256 at 0x7efd343c50c8>
----------------------------------------------------------------------
File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_2.7/build/passlib/utils/pbkdf2.py", line 238, in passlib.utils.pbkdf2.get_prf
Failed example:
dsize
Expected:
32
Got:
32L
----------------------------------------------------------------------
Ran 1822 tests in 113.208s
FAILED (SKIP=573, errors=2, failures=6)