Commit da63fe1a authored by Shane Snyder's avatar Shane Snyder
Browse files

Merge branch 'treddy_test_get_lib_version' into 'master'

TST: test for get_lib_version()

See merge request !104
parents f471874f 7c9df6ae
# miscellaneous tests for the CFFI backend
# that are not specific to any particular
# mod
import re
import pytest
import darshan.backend.cffi_backend as backend
def test_get_lib_version():
# check for a reasonable version string
# returned by get_lib_version()
actual_version = backend.get_lib_version()
# must be a string
assert isinstance(actual_version, str)
# two periods in semantic version num
assert actual_version.count('.') == 2
# stricter regular expression match on
# the semantic version number
prog = re.compile(r"^\d+\.\d+\.\d+(-.+)?$")
match = prog.fullmatch(actual_version)
assert match is not None
assert match.group(0) == actual_version
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment