Home
last modified time | relevance | path

Searched full:assert (Results 1 – 25 of 698) sorted by relevance

12345678910>>...28

/Zephyr-4.2.1/tests/net/lib/lwm2m/interop/pytest/
Dtest_lwm2m.py42 assert latest["lastUpdate"] > start_time
43 assert latest["lastUpdate"] <= time.time()*1000
44 assert latest["lifetime"] == lifetime
72 assert lifetime == 120
75 assert leshan.get(f'/clients/{endpoint}')
79 assert leshan.get(f'/clients/{endpoint}')["queuemode"]
94 assert leshan.read(endpoint, '3/0/0') == 'Zephyr'
95 assert leshan.read(endpoint, '3/0/1') == 'client-1'
96 assert leshan.read(endpoint, '3/0/2') == 'serial-1'
101 assert resp[0][0] == 'Zephyr'
[all …]
Dtest_observe_attributes.py25 assert leshan.write_attributes(endpoint, '3/0/0', {'gt': 4200})['status'] != 'CHANGED(204)'
26 assert leshan.write_attributes(endpoint, '3/0/0', {'lt': 3000})['status'] != 'CHANGED(204)'
27 assert leshan.write_attributes(endpoint, '3/0/0', {'st': 200})['status'] != 'CHANGED(204)'
29 assert leshan.write_attributes(endpoint, '3/0/7', {'gt': 4200})['status'] == 'CHANGED(204)'
30 assert leshan.write_attributes(endpoint, '3/0/7', {'lt': 3000})['status'] == 'CHANGED(204)'
31 assert leshan.write_attributes(endpoint, '3/0/7', {'st': 200})['status'] == 'CHANGED(204)'
42 assert leshan.write_attributes(endpoint, '3/0/7', {'st': 200})['status'] == 'CHANGED(204)'
43 assert (
50 assert data is not None
51 assert data[3][0][7][0] == 3000
[all …]
/Zephyr-4.2.1/scripts/dts/python-devicetree/tests/
Dtest_edtlib.py58 assert caplog.record_tuples == [('devicetree.edtlib', WARNING, warning_message)
68 assert node.interrupts == [
77 assert node.interrupts == [
88 assert node.interrupts == [
95 assert node.interrupts == [
102 assert node.interrupts == [
109 assert node.interrupts == [
116 assert node.interrupts == [
123 assert node.interrupts == [
130 assert node.interrupts == [
[all …]
Dtest_edtlib_binding_init.py106 assert binding.child_binding
118 assert child_binding.child_binding
148 assert expect_type == propspec.type
149 assert expect_req == propspec.required
150 assert expect_desc == propspec.description
151 assert expect_enum == propspec.enum
152 assert expect_const == propspec.const
153 assert expect_default == propspec.default
169 assert set(binding.raw["properties"].keys()) == set(binding.prop2specs.keys())
170 assert all(
[all …]
/Zephyr-4.2.1/scripts/pylib/pytest-twister-harness/tests/helpers/
Dtest_config_reader.py46 assert config_reader.config, "Config is empty"
47 assert config_reader.read("X_PM_MCUBOOT_NAME") == "mcuboot"
48 assert config_reader.read("X_CONFIG_BOOL_TRUE") == "y"
49 assert config_reader.read_bool("X_CONFIG_BOOL_TRUE") is True
50 assert config_reader.read_bool("X_CONFIG_BOOL_FALSE") is False
51 assert config_reader.read_hex("X_PM_MCUBOOT_END_ADDRESS") == "0xd800"
52 assert config_reader.read_int("X_PM_MCUBOOT_END_ADDRESS") == 0xD800
71 assert config_reader.read("DO_NOT_EXIST", "default") == "default"
72 assert config_reader.read_int("DO_NOT_EXIST", 10) == 10
73 assert config_reader.read_hex("DO_NOT_EXIST", 0x20) == "0x20"
[all …]
Dshell_mcuboot_command_parser_test.py32 assert isinstance(mcuboot_parsed, ShellMCUbootCommandParsed)
33 assert isinstance(mcuboot_parsed.areas[0], ShellMCUbootArea)
34 assert len(mcuboot_parsed.areas) == 2
35 assert mcuboot_parsed.areas[0].version == '0.0.2+0'
36 assert mcuboot_parsed.areas[0].swap_type == 'test'
55 assert len(mcuboot_parsed.areas) == 1
56 assert mcuboot_parsed.areas[0].version == '1.1.1+1'
/Zephyr-4.2.1/scripts/tests/twister/
Dtest_harness.py223 assert not harness.recording
228 assert harness.recording == expected_records
267 # Assert
268 assert harness.matched_run_id == exp_id
269 assert harness.status == exp_stat
270 assert harness.capture_coverage == cap_cov
271 assert harness.recording == []
299 # Assert
300 assert robot_harness.instance == instance
301 assert robot_harness.path == "/path/to/robot/test"
[all …]
Dtest_cmakecache.py45 assert b == expected_bool
47 assert str(exception.value) == f'invalid bool {cmake_bool}'
139 assert repr(exception.value) == repr(expected)
143 assert entry is None
146 assert entry.name == expected.name
147 assert entry.value == expected.value
168 assert str(cmake_cache_entry) == expected
182 assert cache.cache_file == 'dummy/path/CMakeCache.txt'
193 assert item[0] == expect[0]
194 assert item[1].name == expect[0]
[all …]
Dtest_scl.py70 assert sys.modules['scl'].Loader == loader_mock if fail_c else \
73 assert sys.modules['scl'].SafeLoader == safeloader_mock if fail_c else \
76 assert sys.modules['scl'].Dumper == dumper_mock if fail_c else \
111 assert logging.getLogger('pykwalify.core').level == log_level
113 assert all([log in caplog.text for log in expected_logs])
116 assert scl._yaml_validate(None, None) is None
117 assert scl._yaml_validate(mock.Mock(), mock.Mock()) is None
162 assert result == result_mock
164 assert 'dummy problem mark:0:0: error: dummy problem' \
187 assert file_name == filename
[all …]
Dtest_twister.py37 assert data
49 assert str(exception.value) == "Schema validation failed"
61 assert scenario
74 assert scenario["extra_args"] == ["UNRELATED1=abc", "UNRELATED2=xyz"]
77 assert ";".join(scenario["extra_conf_files"]) == \
81 assert ";".join(scenario["extra_dtc_overlay_files"]) == \
85 assert scenario["extra_overlay_confs"] == \
89 assert scenario["extra_configs"] == ["CONFIG_FOO=y"]
101 assert len(exception.value.args) == 1
102 assert exception.value.args[0] == str(filename) + ": " + "Dummy message."
/Zephyr-4.2.1/scripts/tests/twister/pytest_integration/
Dtest_harness_pytest.py54 assert c in command
63 assert f'--dut-scope={dut_scope}' in command
73 assert c in command
82 assert f'--extra-test-args={extra_test_args[0]} {extra_test_args[1]}' in command
93 assert pytest_args_from_cmd[0] in command
94 assert pytest_args_from_cmd[1] in command
95 assert pytest_args_from_yaml in command
96 assert command.index(pytest_args_from_yaml) < command.index(pytest_args_from_cmd[1])
107 assert f'--required-build={req_dir}' in command
168 assert pytest_src in command
[all …]
/Zephyr-4.2.1/tests/subsys/debug/assert_custom_header/src/
Dmain.c8 * @brief Custom header assert test suite
24 ZTEST_SUITE(assert, NULL, NULL, NULL, NULL, NULL);
26 ZTEST(assert, test_assert_call) in ZTEST() argument
29 * custom assert macro, this should not crash and the test should proceed. in ZTEST()
31 __ASSERT(false, "This is a custom assert test"); in ZTEST()
33 zassert_true(last_assert_line != 0, "Assert was called on line 0"); in ZTEST()
/Zephyr-4.2.1/scripts/pylib/pytest-twister-harness/tests/fixtures/
Dmcumgr_fixture_test.py72 assert image_list[0].image == 0
73 assert image_list[0].slot == 0
74 assert image_list[0].version == '0.0.0'
75 assert image_list[0].flags == 'active confirmed'
76 assert image_list[0].hash == '0000'
77 assert image_list[1].image == 0
78 assert image_list[1].slot == 1
79 assert image_list[1].version == '1.1.1'
80 assert image_list[1].flags == ''
81 assert image_list[1].hash == '1111'
/Zephyr-4.2.1/scripts/pylib/pytest-twister-harness/tests/device/
Dhardware_adapter_test.py45 assert isinstance(device.command, list)
46assert device.command == ['west', 'flash', '--no-rebuild', '--build-dir', 'build', '--runner', 'ru…
54 assert isinstance(device.command, list)
55 assert device.command == [
65 assert isinstance(device.command, list)
66 assert device.command == [
77 assert isinstance(device.command, list)
78 assert device.command == [
90 assert isinstance(device.command, list)
91 assert device.command == [
[all …]
Dbinary_adapter_test.py59 assert 'Readability counts.' in lines
60 assert os.path.isfile(device.connections[0].log_path)
63 assert file_lines[-2:] == lines[-2:]
76 assert device._process is None
80 assert 'End of script' not in file_lines, 'Script has not been terminated before end'
121 assert device._reader_started.is_set() and device.connections[0]._is_binary_running()
123 assert not device._reader_started.is_set() and not device.connections[0]._is_binary_running()
151 assert len(device.readlines()) > 0
155 assert len(device.readlines()) > 0
168 assert 'The Zen of Python, by Tim Peters' in lines
[all …]
/Zephyr-4.2.1/tests/ztest/ztest_param/pytest/
Dtest_parameters.py11 assert "PASS - test_int_param" in output, f"Expected 'PASS - test_int_param' but got {lines}"
12 assert "PASS - test_dummy" in output, f"Expected 'PASS - test_dummy' but got {lines}"
13assert "PASS - test_string_param" in output, f"Expected 'PASS - test_string_param' but got {lines}"
19 assert "PASS - test_dummy" in output, f"Expected 'PASS - test_dummy' but got {lines}"
26assert pass_dummy_count == 2, f"Expected 2 occurrences of 'PASS - test_dummy' but found {pass_dumm…
33assert pass_ztest_params_count == 2, f"Expected 2 occurrences of 'TESTSUITE ztest_params succeeded…
39assert "TESTSUITE ztest_params succeeded" in output, f"Expected 'TESTSUITE ztest_params succeeded'…
45 assert 'Passed int value:44' in output, 'expected response not found'
50 assert f'Passed string:{test_input}' in lines, 'expected response not found'
/Zephyr-4.2.1/scripts/tests/twister_blackbox/
Dtest_platform.py126 assert board_error if not board_root else not board_error
128 assert str(sys_exit.value) == expected_returncode
151 assert str(sys_exit.value) == '0'
153 assert len(filtered_j) == 26
172 assert str(sys_exit.value) == '0'
174 assert all([platform == 'qemu_x86/atom' for platform, _, _ in filtered_j])
207 assert str(sys_exit.value) == '0'
252 assert pass_search
253 assert int(pass_search.group('passed_configurations')) == \
255 assert int(pass_search.group('test_instances')) == \
[all …]
Dtest_runner.py222 assert built_search
223 assert int(built_search.group('executed_on_platform')) == \
225 assert int(built_search.group('only_built')) == \
228 assert str(sys_exit.value) == '0'
300 assert select_search
301 assert int(select_search.group('test_scenarios')) == \
303 assert int(select_search.group('test_instances')) == \
305 assert int(select_search.group('skipped_configurations')) == \
307 assert int(select_search.group('skipped_by_static_filter')) == \
309 assert int(select_search.group('skipped_at_runtime')) == \
[all …]
Dtest_printouts.py44 'dummy.agnostic.group1.subgroup1.a1_1_tests.assert',
45 'dummy.agnostic.group1.subgroup2.a1_2_tests.assert',
57 'dummy.agnostic.group1.subgroup2.a1_2_tests.assert',
75 'dummy.agnostic.group1.subgroup1.a1_1_tests.assert',
76 'dummy.agnostic.group1.subgroup2.a1_2_tests.assert',
88 'dummy.agnostic.group1.subgroup1.a1_1_tests.assert',
89 'dummy.agnostic.group1.subgroup2.a1_2_tests.assert',
101 'dummy.agnostic.group1.subgroup2.a1_2_tests.assert',
119 'dummy.agnostic.group1.subgroup1.a1_1_tests.assert',
120 'dummy.agnostic.group1.subgroup2.a1_2_tests.assert',
[all …]
Dtest_footprint.py72 assert str(sys_exit.value) == '0'
107 assert str(sys_exit.value) == '0'
109 assert self.FOOTPRINT_LOG in caplog.text
112 assert self.RAM_KEY in caplog.text
113 assert re.search(self.DELTA_WARNING_COMPARE, caplog.text), \
116 assert self.RAM_KEY not in caplog.text
117 assert not re.search(self.DELTA_WARNING_COMPARE, caplog.text), \
135 assert str(sys_exit.value) == '0'
143 assert self.RAM_KEY in ts
160 assert str(sys_exit.value) == '0'
[all …]
/Zephyr-4.2.1/scripts/tests/build_helpers/
Dtest_domains.py57 assert str(s_exit.value) == str(exit_code)
60 assert result is not None
62 assert all([log in caplog.text for log in expected_logs])
129 assert str(exit_st.value) == str(exit_code)
132 assert doms.get_default_domain() == expected_default
133 assert doms.get_top_build_dir() == expected_build_dir
135 assert doms._domains == expected_domains
137 assert all([d in expected_flash_order for d in doms._flash_order])
138 assert all([d in doms._flash_order for d in expected_flash_order])
197 assert result == expected_result
[all …]
/Zephyr-4.2.1/subsys/testsuite/ztest/include/zephyr/
Dztest_error_hook.h48 * @brief Set the flag that treat assert fail happened as expected
50 * @details This is used for negative test cases which triggers a assert
52 * assert fail happened. For normal test case, set it false make it back
55 * @param valid flag indicate assert is expected
59 /* @brief A hook after assert fault handler
62 * order to deal with some special case when catching the expected assert
66 * you want to do after assert handler.
68 * By default, it will abort the thread which assert failed.
/Zephyr-4.2.1/dts/bindings/pwm/
Dxlnx,xps-timer-1.00.a-pwm.yaml8 xlnx,gen0-assert:
11 xlnx,gen1-assert:
14 xlnx,trig0-assert:
17 xlnx,trig1-assert:
/Zephyr-4.2.1/samples/sensor/sensor_shell/pytest/
Dtest_sensor_shell.py16 assert any(['device name: sensor@0' in line for line in lines]), 'expected response not found'
17 assert any(['device name: sensor@1' in line for line in lines]), 'expected response not found'
34assert any([f'channel type={channel}' in line for line in lines]), 'expected response not found'
44assert any(['sensor@0(channel=co2, attr=sampling_frequency)' in line for line in lines]), 'expecte…
48assert any(['sensor@1(channel=gauge_state_of_health, attr=slope_th)' in line for line in lines]), …
59 assert any([expected_line in line for line in lines]), 'expected response not found'
64 assert any([expected_line in line for line in lines]), 'expected response not found'
75 assert any([expected_line in line for line in lines]), 'expected response not found'
80 assert any([expected_line in line for line in lines]), 'expected response not found'
/Zephyr-4.2.1/lib/libc/minimal/include/
Dassert.h22 #ifndef assert
23 #define assert(test) __ASSERT_NO_MSG(test) macro
26 #ifndef assert
27 #define assert(test) ((void)0)

12345678910>>...28