1# Copyright © 2020 Arm Ltd. All rights reserved. 2# Copyright 2020 NXP 3# SPDX-License-Identifier: MIT 4import os 5import importlib 6 7 8def test_rel_version(): 9 import pyarmnn._version as v 10 importlib.reload(v) 11 assert "dev" not in v.__version__ 12 del v 13 14 15def test_dev_version(): 16 import pyarmnn._version as v 17 os.environ["PYARMNN_DEV_VER"] = "1" 18 19 importlib.reload(v) 20 21 assert "32.1.0.dev1" == v.__version__ 22 23 del os.environ["PYARMNN_DEV_VER"] 24 del v 25 26 27def test_arm_version_not_affected(): 28 import pyarmnn._version as v 29 os.environ["PYARMNN_DEV_VER"] = "1" 30 31 importlib.reload(v) 32 33 assert "32.1.0" == v.__arm_ml_version__ 34 35 del os.environ["PYARMNN_DEV_VER"] 36 del v 37