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