Skip to content

[Bug] r.horizon: test fails on Mac with arm64 #3397

@nilason

Description

@nilason

Describe the bug

The test_r_horizon.py ::test_point_mode_multiple_direction_artificial fails on macOS arm64 platform (it succeeds on x86_64 however).

test_r_horizon

./raster/r.horizon – test_r_horizon

❌ Test failed

Test	test_r_horizon
Testsuite	./raster/r.horizon
Test file	./raster/r.horizon/testsuite/test_r_horizon.py
Status	FAILED
Return code	1
Number of tests	6
Successful tests	5
Failed tests	1
Percent successful	83%
Test duration	0:00:21.037551
Tested modules	r.horizon
Supplementary files

standard output (stdout)
standard error output (stderr)
Standard error output (stderr)

.F....
======================================================================
FAIL: test_point_mode_multiple_direction_artificial (__main__.TestHorizon.test_point_mode_multiple_direction_artificial)
Test mode with 1 point and multiple directions with artificial surface
----------------------------------------------------------------------
Traceback (most recent call last):
  File "raster/r.horizon/testsuite/test_r_horizon.py", line 159, in test_point_mode_multiple_direction_artificial
    self.assertMultiLineEqual(first=ref4, second=stdout)
  File "etc/python/grass/gunittest/case.py", line 179, in assertMultiLineEqual
    return super().assertMultiLineEqual(first=first, second=second, msg=msg)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 'azim[15 chars]ght\n0.000000,0.197017\n20.000000,0.196832\n40[327 chars]63\n' != 'azim[15 chars]ght\n360.000000,0.197017\n20.000000,0.196832\n[329 chars]63\n'
  azimuth,horizon_height
- 0.000000,0.197017
+ 360.000000,0.197017
? ++
  20.000000,0.196832
  40.000000,0.196875
  60.000000,0.196689
  80.000000,0.196847
  100.000000,0.196645
  120.000000,0.196969
  140.000000,0.196778
  160.000000,0.196863
  180.000000,0.197017
  200.000000,0.196832
  220.000000,0.196875
  240.000000,0.196689
  260.000000,0.196847
  280.000000,0.196645
  300.000000,0.196969
  320.000000,0.196778
  340.000000,0.196863


----------------------------------------------------------------------
Ran 6 tests in 20.967s
FAILED (failures=1)
test_r_horizon stdout

azimuth,horizon_height
180.000000,0.023101
200.000000,0.034850
220.000000,0.050549
240.000000,0.048211
260.000000,0.053101
280.000000,0.039774
300.000000,0.032360
320.000000,0.014804
340.000000,0.000000
360.000000,0.004724
20.000000,0.012612
40.000000,0.015207
60.000000,0.014344
80.000000,0.011044
100.000000,0.012192
120.000000,0.007462
140.000000,0.004071
160.000000,0.015356


azimuth,horizon_height
360.000000,0.197017
20.000000,0.196832
40.000000,0.196875
60.000000,0.196689
80.000000,0.196847
100.000000,0.196645
120.000000,0.196969
140.000000,0.196778
160.000000,0.196863
180.000000,0.197017
200.000000,0.196832
220.000000,0.196875
240.000000,0.196689
260.000000,0.196847
280.000000,0.196645
300.000000,0.196969
320.000000,0.196778
340.000000,0.196863


azimuth,horizon_height
180.000000,0.023101



Calculating map 1 of 2 (angle 10.00, raster map <test_horizon_output_from_elevation_010_000>)
0..3..6..9..12..15..18..21..24..27..30..33..36..39..42..45..48..51..54..57..60..63..66..69..72..75..78..81..84..87..90..93..96..99..100
Calculating map 2 of 2 (angle 25.51, raster map <test_horizon_output_from_elevation_025_512>)
0..3..6..9..12..15..18..21..24..27..30..33..36..39..42..45..48..51..54..57..60..63..66..69..72..75..78..81..84..87..90..93..96..99..100


Calculating map 1 of 2 (angle 90.00, raster map <test_horizon_output_from_elevation_090_000>)
0..3..6..9..12..15..18..21..24..27..30..33..36..39..42..45..48..51..54..57..60..63..66..69..72..75..78..81..84..87..90..93..96..99..100
Calculating map 2 of 2 (angle 105.51, raster map <test_horizon_output_from_elevation_105_512>)
0..3..6..9..12..15..18..21..24..27..30..33..36..39..42..45..48..51..54..57..60..63..66..69..72..75..78..81..84..87..90..93..96..99..100


Calculating map 1 of 1 (angle 50.00, raster map <test_horizon_output_from_elevation_050>)
0..3..6..9..12..15..18..21..24..27..30..33..36..39..42..45..48..51..54..57..60..63..66..69..72..75..78..81..84..87..90..93..96..99..100
test_r_horizon stderr

.F....
======================================================================
FAIL: test_point_mode_multiple_direction_artificial (__main__.TestHorizon.test_point_mode_multiple_direction_artificial)
Test mode with 1 point and multiple directions with artificial surface
----------------------------------------------------------------------
Traceback (most recent call last):
  File "raster/r.horizon/testsuite/test_r_horizon.py", line 159, in test_point_mode_multiple_direction_artificial
    self.assertMultiLineEqual(first=ref4, second=stdout)
  File "etc/python/grass/gunittest/case.py", line 179, in assertMultiLineEqual
    return super().assertMultiLineEqual(first=first, second=second, msg=msg)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 'azim[15 chars]ght\n0.000000,0.197017\n20.000000,0.196832\n40[327 chars]63\n' != 'azim[15 chars]ght\n360.000000,0.197017\n20.000000,0.196832\n[329 chars]63\n'
  azimuth,horizon_height
- 0.000000,0.197017
+ 360.000000,0.197017
? ++
  20.000000,0.196832
  40.000000,0.196875
  60.000000,0.196689
  80.000000,0.196847
  100.000000,0.196645
  120.000000,0.196969
  140.000000,0.196778
  160.000000,0.196863
  180.000000,0.197017
  200.000000,0.196832
  220.000000,0.196875
  240.000000,0.196689
  260.000000,0.196847
  280.000000,0.196645
  300.000000,0.196969
  320.000000,0.196778
  340.000000,0.196863


----------------------------------------------------------------------
Ran 6 tests in 20.967s
FAILED (failures=1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingmacOSmacOS specificrasterRelated to raster data processing

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions