File: test_smoke.py

package info (click to toggle)
python-argon2-cffi-bindings 25.1.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 192 kB
  • sloc: python: 108; makefile: 8
file content (19 lines) | stat: -rw-r--r-- 534 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# SPDX-License-Identifier: MIT

"""
Since this package doesn't do anything beyond providing bindings, all we can
do is trying to ensure that those bindings are functional.
"""


def test_smoke():
    """
    lib and ffi can be imported and looks OK.
    """
    from _argon2_cffi_bindings import ffi, lib

    assert repr(ffi).startswith("<_cffi_backend.FFI object at")
    assert repr(lib).startswith("<Lib object for")

    assert 19 == lib.ARGON2_VERSION_NUMBER
    assert 42 == lib.argon2_encodedlen(1, 2, 3, 4, 5, lib.Argon2_id)