MATLABĀ® Test Report

Timestamp:

30-Oct-2024 21:14:50

Host:

fv-az1117-782

Platform:

glnxa64

MATLAB Version:

24.2.0.2740171 (R2024b) Update 1

Number of Tests:

9

Testing Time:

27.1637 seconds

Overall Result:

PASSED

Overview

/home/runner/work/Programming-A-Starter-Project-Using-MATLAB-and-Python/Programming-A-Starter-Project-Using-MATLAB-and-Python/SoftwareTests/

SmokeTests

23.1054 seconds

SolnSmokeTests

4.0584 seconds

Details

/home/runner/work/Programming-A-Starter-Project-Using-MATLAB-and-Python/Programming-A-Starter-Project-Using-MATLAB-and-Python/SoftwareTests/

SmokeTests

SmokeRun Class Setup Parameters: Project=matlab.project.Project Test Parameters: File=CheckingTheWeather.mlx

The test passed. Duration: 4.8883 seconds

(Overview)

SmokeRun Class Setup Parameters: Project=matlab.project.Project Test Parameters: File=CreateCurrentWeatherApp.mlx

The test passed. Duration: 15.1299 seconds

(Overview)

SmokeRun Class Setup Parameters: Project=matlab.project.Project Test Parameters: File=UsingMATLABwithPython.mlx

The test passed. Duration: 3.0872 seconds

(Overview)

SolnSmokeTests

ExistSolns Class Setup Parameters: Project=matlab.project.Project Test Parameters: File=CheckingTheWeather.mlx

The test passed. Duration: 0.0962 seconds

(Overview)

ExistSolns Class Setup Parameters: Project=matlab.project.Project Test Parameters: File=CreateCurrentWeatherApp.mlx

The test passed. Duration: 0.0077 seconds

(Overview)

ExistSolns Class Setup Parameters: Project=matlab.project.Project Test Parameters: File=UsingMATLABwithPython.mlx

The test passed. Duration: 0.0062 seconds

(Overview)

SmokeRun Class Setup Parameters: Project=matlab.project.Project Test Parameters: File=CheckingTheWeather.mlx

The test passed. Duration: 0.3024 seconds

(Overview)

SmokeRun Class Setup Parameters: Project=matlab.project.Project Test Parameters: File=CreateCurrentWeatherApp.mlx

The test passed. Duration: 0.4729 seconds

(Overview)

SmokeRun Class Setup Parameters: Project=matlab.project.Project Test Parameters: File=UsingMATLABwithPython.mlx

The test passed. Duration: 3.1731 seconds

(Overview)

Command Window Text

Running SmokeTests >> Running CheckingTheWeather.mlx You are running Python 3.10 Python was already on your MATLAB path. You are running compatible versions of MATLAB and Python. ans = 'py.dict' currentWeather = Python dict with no properties. {'temp': 274.86, 'feels_like': 270.03, 'temp_min': 273.44, 'temp_max': 276.25, 'pressure': 1003.0, 'humidity': 76.0, 'local_time': '2024-10-30 21:14:20.972848', 'current_time': 1710986897, 'wind_speed': 5.66, 'wind_deg': 280.0, 'clouds': 75.0, 'timezone': -14400, 'sunrise': 1710931672, 'sunset': 1710975450, 'city_name': 'Natick', 'weather': [{'id': 803, 'main': 'Clouds', 'description': 'broken clouds', 'icon': '04n'}]} ans = Python dict_keys with properties: mapping: [1x1 py.mappingproxy] dict_keys(['temp', 'feels_like', 'temp_min', 'temp_max', 'pressure', 'humidity', 'local_time', 'current_time', 'wind_speed', 'wind_deg', 'clouds', 'timezone', 'sunrise', 'sunset', 'city_name', 'weather']) ans = 270.0300 curWeather = struct with fields: temp: 274.8600 feels_like: 270.0300 temp_min: 273.4400 temp_max: 276.2500 pressure: 1003 humidity: 76 local_time: [1x26 py.str] current_time: [1x1 py.int] wind_speed: 5.6600 wind_deg: 280 clouds: 75 timezone: [1x1 py.int] sunrise: [1x1 py.int] sunset: [1x1 py.int] city_name: [1x6 py.str] weather: [1x1 py.list] ans = "2024-10-30 21:14:20.972848" ans = datetime 30-Oct-2024 21:14:20 ans = Python list with values: [{'id': 803, 'main': 'Clouds', 'description': 'broken clouds', 'icon': '04n'}] Use string, double or cell function to convert to a MATLAB array. weather = struct with fields: id: [1x1 py.int] main: [1x6 py.str] description: [1x13 py.str] icon: [1x3 py.str] weather = struct with fields: id: [1x1 py.int] main: "Clouds" description: "broken clouds" icon: [1x3 py.str] The pressure is 752.3117 mmHg. .>> Running CreateCurrentWeatherApp.mlx appdesigner = function_handle with value: @()disp("Open App Designer here.") Did you notice that the pyrun command is using "standard" units? Did you use symunits to convert the pressure from hPa to mmHg? Did you separate the new pressure value from the symbolic unit? Did you convert the pressure value back to a double? .>> Running UsingMATLABwithPython.mlx This is release R2024b, so you can proceed with this script. You are running Python 3.10 Python was already on your MATLAB path. You are running compatible versions of MATLAB and Python. You do not have any Python code defined by the Live Task. Please try again. . Done SmokeTests __________ Running SolnSmokeTests ...>> Running CheckingTheWeatherSoln.mlx You are running Python 3.10 Python was already on your MATLAB path. You are running compatible versions of MATLAB and Python. currentWeather = Python dict with no properties. {'temp': 274.86, 'feels_like': 270.03, 'temp_min': 273.44, 'temp_max': 276.25, 'pressure': 1003.0, 'humidity': 76.0, 'local_time': '2024-10-30 21:14:42.261940', 'current_time': 1710986897, 'wind_speed': 5.66, 'wind_deg': 280.0, 'clouds': 75.0, 'timezone': -14400, 'sunrise': 1710931672, 'sunset': 1710975450, 'city_name': 'Natick', 'weather': [{'id': 803, 'main': 'Clouds', 'description': 'broken clouds', 'icon': '04n'}]} ans = 'py.dict' currentWeather = Python dict with no properties. {'temp': 274.86, 'feels_like': 270.03, 'temp_min': 273.44, 'temp_max': 276.25, 'pressure': 1003.0, 'humidity': 76.0, 'local_time': '2024-10-30 21:14:42.261940', 'current_time': 1710986897, 'wind_speed': 5.66, 'wind_deg': 280.0, 'clouds': 75.0, 'timezone': -14400, 'sunrise': 1710931672, 'sunset': 1710975450, 'city_name': 'Natick', 'weather': [{'id': 803, 'main': 'Clouds', 'description': 'broken clouds', 'icon': '04n'}]} ans = Python dict_keys with properties: mapping: [1x1 py.mappingproxy] dict_keys(['temp', 'feels_like', 'temp_min', 'temp_max', 'pressure', 'humidity', 'local_time', 'current_time', 'wind_speed', 'wind_deg', 'clouds', 'timezone', 'sunrise', 'sunset', 'city_name', 'weather']) ans = 270.0300 curWeather = struct with fields: temp: 274.8600 feels_like: 270.0300 temp_min: 273.4400 temp_max: 276.2500 pressure: 1003 humidity: 76 local_time: [1x26 py.str] current_time: [1x1 py.int] wind_speed: 5.6600 wind_deg: 280 clouds: 75 timezone: [1x1 py.int] sunrise: [1x1 py.int] sunset: [1x1 py.int] city_name: [1x6 py.str] weather: [1x1 py.list] ans = 'double' ans = 'double' ans = 'py.int' ans = 'py.int' ans = 'py.str' ans = 'py.str' ans = "2024-10-30 21:14:42.261940" ans = datetime 30-Oct-2024 21:14:42 ans = Python list with values: [{'id': 803, 'main': 'Clouds', 'description': 'broken clouds', 'icon': '04n'}] Use string, double or cell function to convert to a MATLAB array. weather = struct with fields: id: [1x1 py.int] main: [1x6 py.str] description: [1x13 py.str] icon: [1x3 py.str] weather = struct with fields: id: [1x1 py.int] main: "Clouds" description: "broken clouds" icon: [1x3 py.str] The pressure is 752.3117 mmHg. .>> Running CreateCurrentWeatherAppSoln.mlx .>> Running UsingMATLABwithPythonSoln.mlx This is release R2024b, so you can proceed with this script. You are running Python 3.10 Python was already on your MATLAB path. You are running compatible versions of MATLAB and Python. The tax due is: 2.37 tax = 2.3749 Your Python code looks correct, but you may have incorrect pyrun code. It should say: [tax] = pyrun(pycode, ... [ "tax" ], "dollars", dollars, "percent", percent) tax = 2.3749 Hello, Team! . Done SolnSmokeTests __________