# -*- coding: utf-8 -*- ########################################################################### # # Copyright (c) 2020-2022 Diality Inc. - All Rights Reserved. # # THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN # WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. # # @file test.py # # @author (last) Peter Lucia # @date (last) 11-Nov-2020 # @author (original) Behrouz NematiPour # @date (original) 21-Apr-2020 # ############################################################################ from dialin.ui import utils, unittests from dialin.utils.base import is_interface_present, is_interface_up def main(): utils.tstStart(__file__) unittests.test_python_version() unittests.test_crc8() test.compare(is_interface_present("can0"), True, "CAN interface is present") test.compare(is_interface_up("can0"), True, "CAN interface is up") unittests.test_can0() utils.tstDone()