Adding Output Support for Double2DArray for Client Generator and Service and updating Sample Measurement Example #2726
GitHub Actions / Test Results
failed
Nov 25, 2024 in 0s
2 fail, 701 pass in 52m 9s
Annotations
Check warning on line 0 in tests.acceptance.test_client_generator
github-actions / Test Results
All 10 runs failed: test___non_streaming_measurement___create_client___render_without_error (tests.acceptance.test_client_generator)
test_results/generator/test_results/nimg-i-0512c3e78a5e727a8-py310.xml [took 2s]
test_results/generator/test_results/nimg-i-0512c3e78a5e727a8-py311.xml [took 2s]
test_results/generator/test_results/nimg-i-0512c3e78a5e727a8-py312.xml [took 2s]
test_results/generator/test_results/nimg-i-0512c3e78a5e727a8-py38.xml [took 2s]
test_results/generator/test_results/nimg-i-0512c3e78a5e727a8-py39.xml [took 3s]
test_results/generator/test_results/nimg-i-09b21a57b68c53187-py310.xml [took 3s]
test_results/generator/test_results/nimg-i-09b21a57b68c53187-py311.xml [took 5s]
test_results/generator/test_results/nimg-i-09b21a57b68c53187-py312.xml [took 6s]
test_results/generator/test_results/nimg-i-09b21a57b68c53187-py38.xml [took 3s]
test_results/generator/test_results/nimg-i-09b21a57b68c53187-py39.xml [took 4s]
Raw output
assert '"""Generated...pin_map_id)\n' == '"""Generated...pin_map_id)\n'
"""Generated client API for the 'Non-Streaming Data Measurement (Py)' measurement plug-in."""
from __future__ import annotations
import logging
import pathlib...
...Full output truncated (701 lines hidden), use '-vv' to show
create_client = functools.partial(<bound method CliRunner.invoke of <click.testing.CliRunner object at 0x03CDFE88>>, <Command create-client>, standalone_mode=False)
test_assets_directory = WindowsPath('C:/ar/_work/measurement-plugin-python/measurement-plugin-python/packages/generator/tests/test_assets')
tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x03C0E0C0>, _basetemp=WindowsPath('C:/Users/ec2-user/AppData/Local/Temp/pytest-of-unknown/pytest-9'), _retention_count=3, _retention_policy='all')
non_streaming_measurement_service = <ni_measurement_plugin_sdk_service.measurement.service.MeasurementService object at 0x03C79900>
def test___non_streaming_measurement___create_client___render_without_error(
create_client: CliRunnerFunction,
test_assets_directory: pathlib.Path,
tmp_path_factory: pytest.TempPathFactory,
non_streaming_measurement_service: MeasurementService,
) -> None:
temp_directory = tmp_path_factory.mktemp("measurement_plugin_client_files")
module_name = "non_streaming_data_measurement_client"
golden_path = test_assets_directory / "example_renders" / "measurement_plugin_client"
filename = f"{module_name}.py"
result = create_client(
[
"--measurement-service-class",
"ni.tests.NonStreamingDataMeasurement_Python",
"--module-name",
module_name,
"--class-name",
"NonStreamingDataMeasurementClient",
"--directory-out",
str(temp_directory),
]
)
assert result.exit_code == 0
> _assert_equal(
golden_path / filename,
temp_directory / filename,
)
tests\acceptance\test_client_generator.py:45:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
expected_path = WindowsPath('C:/ar/_work/measurement-plugin-python/measurement-plugin-python/packages/generator/tests/test_assets/example_renders/measurement_plugin_client/non_streaming_data_measurement_client.py')
result_path = WindowsPath('C:/Users/ec2-user/AppData/Local/Temp/pytest-of-unknown/pytest-9/measurement_plugin_client_files0/non_streaming_data_measurement_client.py')
def _assert_equal(expected_path: pathlib.Path, result_path: pathlib.Path) -> None:
expected = expected_path.read_text()
result = result_path.read_text()
> assert expected == result
E assert '"""Generated...pin_map_id)\n' == '"""Generated...pin_map_id)\n'
E
E """Generated client API for the 'Non-Streaming Data Measurement (Py)' measurement plug-in."""
E
E from __future__ import annotations
E
E import logging
E import pathlib...
E
E ...Full output truncated (701 lines hidden), use '-vv' to show
tests\acceptance\test_client_generator.py:203: AssertionError
Check warning on line 0 in tests.acceptance.test_client_generator
github-actions / Test Results
All 10 runs failed: test___interactive_mode_with_registered_measurements___create_client___renders_without_error (tests.acceptance.test_client_generator)
test_results/generator/test_results/nimg-i-0512c3e78a5e727a8-py310.xml [took 0s]
test_results/generator/test_results/nimg-i-0512c3e78a5e727a8-py311.xml [took 0s]
test_results/generator/test_results/nimg-i-0512c3e78a5e727a8-py312.xml [took 0s]
test_results/generator/test_results/nimg-i-0512c3e78a5e727a8-py38.xml [took 0s]
test_results/generator/test_results/nimg-i-0512c3e78a5e727a8-py39.xml [took 0s]
test_results/generator/test_results/nimg-i-09b21a57b68c53187-py310.xml [took 1s]
test_results/generator/test_results/nimg-i-09b21a57b68c53187-py311.xml [took 1s]
test_results/generator/test_results/nimg-i-09b21a57b68c53187-py312.xml [took 3s]
test_results/generator/test_results/nimg-i-09b21a57b68c53187-py38.xml [took 1s]
test_results/generator/test_results/nimg-i-09b21a57b68c53187-py39.xml [took 1s]
Raw output
assert '"""Generated...pin_map_id)\n' == '"""Generated...pin_map_id)\n'
"""Generated client API for the 'Non-Streaming Data Measurement (Py)' measurement plug-in."""
from __future__ import annotations
import logging
import pathlib...
...Full output truncated (701 lines hidden), use '-vv' to show
create_client = functools.partial(<bound method CliRunner.invoke of <click.testing.CliRunner object at 0x03CDFE88>>, <Command create-client>, standalone_mode=False)
test_assets_directory = WindowsPath('C:/ar/_work/measurement-plugin-python/measurement-plugin-python/packages/generator/tests/test_assets')
tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x03C0E0C0>, _basetemp=WindowsPath('C:/Users/ec2-user/AppData/Local/Temp/pytest-of-unknown/pytest-9'), _retention_count=3, _retention_policy='all')
non_streaming_measurement_service = <ni_measurement_plugin_sdk_service.measurement.service.MeasurementService object at 0x03C79900>
def test___interactive_mode_with_registered_measurements___create_client___renders_without_error(
create_client: CliRunnerFunction,
test_assets_directory: pathlib.Path,
tmp_path_factory: pytest.TempPathFactory,
non_streaming_measurement_service: MeasurementService,
) -> None:
temp_directory = tmp_path_factory.mktemp("measurement_plugin_client_files")
golden_path = test_assets_directory / "example_renders" / "measurement_plugin_client"
filename = "non_streaming_data_measurement_client.py"
inputs = [
"1",
"non_streaming_data_measurement_client",
"NonStreamingDataMeasurementClient",
"x",
]
os.chdir(temp_directory)
result = create_client(["--interactive"], input="\n".join(inputs))
assert result.exit_code == 0
> _assert_equal(
golden_path / filename,
temp_directory / filename,
)
C:\ar\_work\measurement-plugin-python\measurement-plugin-python\packages\generator\tests\acceptance\test_client_generator.py:131:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
expected_path = WindowsPath('C:/ar/_work/measurement-plugin-python/measurement-plugin-python/packages/generator/tests/test_assets/example_renders/measurement_plugin_client/non_streaming_data_measurement_client.py')
result_path = WindowsPath('C:/Users/ec2-user/AppData/Local/Temp/pytest-of-unknown/pytest-9/measurement_plugin_client_files3/non_streaming_data_measurement_client.py')
def _assert_equal(expected_path: pathlib.Path, result_path: pathlib.Path) -> None:
expected = expected_path.read_text()
result = result_path.read_text()
> assert expected == result
E assert '"""Generated...pin_map_id)\n' == '"""Generated...pin_map_id)\n'
E
E """Generated client API for the 'Non-Streaming Data Measurement (Py)' measurement plug-in."""
E
E from __future__ import annotations
E
E import logging
E import pathlib...
E
E ...Full output truncated (701 lines hidden), use '-vv' to show
C:\ar\_work\measurement-plugin-python\measurement-plugin-python\packages\generator\tests\acceptance\test_client_generator.py:203: AssertionError
Loading