-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ADF5611:test:Add test file for ADF5611
Added pytest file for adf5611, modified index.rst file to include device, correct attribute name error in adf5611_examples.py Signed-off-by: Jude Osemene <[email protected]>
- Loading branch information
1 parent
4305730
commit 4c50d63
Showing
4 changed files
with
75 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import pytest | ||
|
||
# This hardware is not yet supported for emulation | ||
# Will run this by someone soon | ||
hardware = ["adf5611"] | ||
classname = "adi.adf5611" | ||
|
||
|
||
######################################### | ||
@pytest.mark.iio_hardware(hardware) | ||
@pytest.mark.parametrize("classname", [classname]) | ||
@pytest.mark.parametrize( | ||
"attr, start, stop, step, tol, repeats", | ||
[ | ||
("altvolt0_rfout_power", 1, 3, 1, 0, 2), | ||
("rfoutdiv_power", 1, 3, 1, 0, 2), | ||
("reference_divider", 1, 16383, 2, 0, 1), | ||
("rfout_frequency", 8000000000, 12000000000, 100000000, 0, 1), | ||
], | ||
) | ||
def test_adf5611_attrs( | ||
test_attribute_single_value, | ||
iio_uri, | ||
classname, | ||
attr, | ||
start, | ||
stop, | ||
step, | ||
tol, | ||
repeats, | ||
): | ||
test_attribute_single_value( | ||
iio_uri, classname, attr, start, stop, step, tol, repeats | ||
) | ||
|
||
|
||
######################################### | ||
@pytest.mark.iio_hardware(hardware) | ||
@pytest.mark.parametrize("classname", [(classname)]) | ||
@pytest.mark.parametrize( | ||
"attr, value", | ||
[("en_rfoutdiv", 0), ("en_rfoutdiv", 1)], | ||
) | ||
def test_adf5611_attrs_bool( | ||
test_attribute_single_value_boolean, iio_uri, classname, attr, value, | ||
): | ||
test_attribute_single_value_boolean(iio_uri, classname, attr, value) |