def test_wrong_open(): # Initialize object tegra = Tegrastats('wrong_path', 100) try: # Open data tegra.open() assert False except Tegrastats.TegrastatsException: assert True
def test_stats_callback(): # Initialize object tegra = Tegrastats('/usr/bin/tegrastats', 100) # Open data tegra.open(check_tegra) # Close connection tegra.close()
def test_open(): # Initialize object tegra = Tegrastats('/usr/bin/tegrastats', 100) # Open data tegra.open() # Close connection tegra.close() assert True
def test_stats(): # Load tegracontroller with Tegrastats('/usr/bin/tegrastats', 100) as tegra: # Check tegra stats check_tegra(tegra)