Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Many tests fail on 10.6.8 Rosetta [ FAIL 32 | WARN 0 | SKIP 0 | PASS 78 ] #57

Open
barracuda156 opened this issue Jun 21, 2023 · 6 comments
Assignees
Labels
testing Need for debugging and/or unit tests

Comments

@barracuda156
Copy link

barracuda156 commented Jun 21, 2023

UPD. Native PowerPC build and tests appear good (see below).

R version 4.3.0 (2023-04-21) -- "Already Tomorrow"
Copyright (C) 2023 The R Foundation for Statistical Computing
Platform: powerpc-apple-darwin10.8.0 (32-bit)

> library(testthat)
> library(fxl)
Loading required package: rlang

Attaching package: 'rlang'

The following objects are masked from 'package:testthat':

    is_false, is_null, is_true

Loading required package: grImport
Loading required package: grid
Loading required package: XML
> 
> test_check("fxl")
[ FAIL 32 | WARN 0 | SKIP 0 | PASS 78 ]

══ Failed tests ════════════════════════════════════════════════════════════════
── Failure ('test-demo-concurrentplot.R:13:5'): Concurrent Plot Style: Should render as normal ──
Expected `print(...)` to run without any errors.
i Actually got a <simpleError>:
  Error in `plot.new()`:
  ! figure margins too large
── Failure ('test-demo-concurrentplot.R:13:5'): Concurrent Plot Style: Should render as normal ──
Expected `print(...)` to run without any errors.
i Actually got a <simpleError>:
  Error in `par()`:
  ! invalid value specified for graphical parameter "mai"
── Failure ('test-demo-cumulativeplot.R:3:5'): Cumulative Plot Style: Should render as normal ──
Expected `print(...)` to run without any errors.
i Actually got a <simpleError>:
  Error in `plot.new()`:
  ! figure margins too large
── Failure ('test-demo-cumulativeplot.R:3:5'): Cumulative Plot Style: Should render as normal ──
Expected `print(...)` to run without any errors.
i Actually got a <simpleError>:
  Error in `par()`:
  ! invalid value specified for graphical parameter "fig"
── Error ('test-demo-cumulativeplot_single.R:6:5'): Cumulative Plot Style: Should render as normal ──
Error in `plot.new()`: figure margins too large
Backtrace:
     ▆
  1. ├─testthat::expect_error(...) at test-demo-cumulativeplot_single.R:6:4
  2. │ └─testthat:::expect_condition_matching(...)
  3. │   └─testthat:::quasi_capture(...)
  4. │     ├─testthat (local) .capture(...)
  5. │     │ └─base::withCallingHandlers(...)
  6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
  7. ├─base::print(...)
  8. └─fxl::print.fxl(...)
  9.   ├─base::plot(...)
 10.   └─graphics::plot.default(...)
 11.     └─graphics::plot.new()
── Error ('test-demo-cumulativeplot_single.R:6:5'): Cumulative Plot Style: Should render as normal ──
Error in `par(opar)`: invalid value specified for graphical parameter "mar"
Backtrace:
    ▆
 1. ├─testthat::expect_error(...) at test-demo-cumulativeplot_single.R:6:4
 2. │ └─testthat:::expect_condition_matching(...)
 3. │   └─testthat:::quasi_capture(...)
 4. │     ├─testthat (local) .capture(...)
 5. │     │ └─base::withCallingHandlers(...)
 6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
 7. ├─base::print(...)
 8. └─fxl::print.fxl(...)
 9.   └─graphics::par(opar)
── Failure ('test-demo-faplot.R:5:5'): FA Plot Style: Should render as normal ──
Expected ``%>%`(...)` to run without any errors.
i Actually got a <simpleError>:
  Error in `plot.new()`:
  ! figure margins too large
── Failure ('test-demo-faplot.R:5:5'): FA Plot Style: Should render as normal ──
Expected ``%>%`(...)` to run without any errors.
i Actually got a <simpleError>:
  Error in `par()`:
  ! invalid value specified for graphical parameter "fig"
── Failure ('test-demo-faplotintegrity.R:13:5'): FA Plot with Integrity: Should render as normal ──
Expected `print(...)` to run without any errors.
i Actually got a <simpleError>:
  Error in `plot.new()`:
  ! figure margins too large
── Failure ('test-demo-faplotintegrity.R:13:5'): FA Plot with Integrity: Should render as normal ──
Expected `print(...)` to run without any errors.
i Actually got a <simpleError>:
  Error in `par()`:
  ! invalid value specified for graphical parameter "mar"
── Failure ('test-demo-faplotintegrity_extra.R:83:5'): FA Plot with Integrity: Should render as normal ──
Expected `print(...)` to run without any errors.
i Actually got a <simpleError>:
  Error in `plot.new()`:
  ! figure margins too large
── Failure ('test-demo-faplotintegrity_extra.R:83:5'): FA Plot with Integrity: Should render as normal ──
Expected `print(...)` to run without any errors.
i Actually got a <simpleError>:
  Error in `par()`:
  ! invalid value specified for graphical parameter "fig"
── Failure ('test-demo-image-draws.R:34:5'): Image Draw Layer: Should render as normal ──
Expected `print(...)` to run without any errors.
i Actually got a <simpleError>:
  Error in `plot.new()`:
  ! figure margins too large
── Failure ('test-demo-image-draws.R:34:5'): Image Draw Layer: Should render as normal ──
Expected `print(...)` to run without any errors.
i Actually got a <simpleError>:
  Error in `par()`:
  ! invalid value specified for graphical parameter "mar"
── Failure ('test-demo-image-draws.R:127:5'): Image Draw Layer: Should render as normal without phases ──
Expected `print(...)` to run without any errors.
i Actually got a <simpleError>:
  Error in `plot.new()`:
  ! figure margins too large
── Failure ('test-demo-image-draws.R:127:5'): Image Draw Layer: Should render as normal without phases ──
Expected `print(...)` to run without any errors.
i Actually got a <simpleError>:
  Error in `par()`:
  ! invalid value specified for graphical parameter "fig"
── Failure ('test-demo-image-draws.R:219:5'): Image Draw Layer: Should render as normal without facets ──
Expected `print(...)` to run without any errors.
i Actually got a <simpleError>:
  Error in `plot.new()`:
  ! figure margins too large
── Failure ('test-demo-image-draws.R:219:5'): Image Draw Layer: Should render as normal without facets ──
Expected `print(...)` to run without any errors.
i Actually got a <simpleError>:
  Error in `par()`:
  ! invalid value specified for graphical parameter "mar"
── Failure ('test-demo-multiplebaseline_greyed.R:98:5'): MBL Greyed out Plot Style: Should render as normal ──
Expected `print(...)` to run without any errors.
i Actually got a <simpleError>:
  Error in `plot.new()`:
  ! figure margins too large
── Failure ('test-demo-multiplebaseline_greyed.R:98:5'): MBL Greyed out Plot Style: Should render as normal ──
Expected `print(...)` to run without any errors.
i Actually got a <simpleError>:
  Error in `par()`:
  ! invalid value specified for graphical parameter "fig"
── Failure ('test-demo-multiplebaseline_greyed.R:303:5'): MBL Greyed out Plot Style: Should specific to facet ──
Expected `print(...)` to run without any errors.
i Actually got a <simpleError>:
  Error in `plot.new()`:
  ! figure margins too large
── Failure ('test-demo-multiplebaseline_greyed.R:303:5'): MBL Greyed out Plot Style: Should specific to facet ──
Expected `print(...)` to run without any errors.
i Actually got a <simpleError>:
  Error in `par()`:
  ! invalid value specified for graphical parameter "mar"
── Failure ('test-demo-multiplebaselineplot.R:5:5'): MBL Plot Style: Should render as normal ──
Expected `print(...)` to run without any errors.
i Actually got a <simpleError>:
  Error in `plot.new()`:
  ! figure margins too large
── Failure ('test-demo-multiplebaselineplot.R:5:5'): MBL Plot Style: Should render as normal ──
Expected `print(...)` to run without any errors.
i Actually got a <simpleError>:
  Error in `par()`:
  ! invalid value specified for graphical parameter "fig"
── Failure ('test-demo-semilogplot.R:28:5'): Semi Log Plot Style: Should render as normal ──
Expected `print(...)` to run without any errors.
i Actually got a <simpleError>:
  Error in `plot.new()`:
  ! figure margins too large
── Failure ('test-demo-semilogplot.R:28:5'): Semi Log Plot Style: Should render as normal ──
Expected `print(...)` to run without any errors.
i Actually got a <simpleError>:
  Error in `par()`:
  ! invalid value specified for graphical parameter "mar"
── Failure ('test-demo-semilogplot_multi.R:131:5'): Semi Log Plot Style-Multiplanel: Should render as normal ──
Expected `print(...)` to run without any errors.
i Actually got a <simpleError>:
  Error in `plot.new()`:
  ! figure margins too large
── Failure ('test-demo-semilogplot_multi.R:131:5'): Semi Log Plot Style-Multiplanel: Should render as normal ──
Expected `print(...)` to run without any errors.
i Actually got a <simpleError>:
  Error in `par()`:
  ! invalid value specified for graphical parameter "fig"
── Failure ('test-demo-silvermanplot.R:12:5'): Silverman Plot Style: Should render as normal ──
Expected `print(...)` to run without any errors.
i Actually got a <simpleError>:
  Error in `plot.new()`:
  ! figure margins too large
── Failure ('test-demo-silvermanplot.R:12:5'): Silverman Plot Style: Should render as normal ──
Expected `print(...)` to run without any errors.
i Actually got a <simpleError>:
  Error in `par()`:
  ! invalid value specified for graphical parameter "mar"
── Error ('test-element-scr_xoverride.R:3:5'): scr_xoverride: Should render as normal ──
Error in `par(opar)`: invalid value specified for graphical parameter "fig"
Backtrace:
    ▆
 1. ├─testthat::expect_error(...) at test-element-scr_xoverride.R:3:4
 2. │ └─testthat:::expect_condition_matching(...)
 3. │   └─testthat:::quasi_capture(...)
 4. │     ├─testthat (local) .capture(...)
 5. │     │ └─base::withCallingHandlers(...)
 6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
 7. ├─base::print(...)
 8. └─fxl::print.fxl(...)
 9.   └─graphics::par(opar)
── Error ('test-element-scr_yoverride.R:3:5'): scr_yoverride: Should render as normal ──
Error in `par(opar)`: invalid value specified for graphical parameter "mar"
Backtrace:
    ▆
 1. ├─testthat::expect_error(...) at test-element-scr_yoverride.R:3:4
 2. │ └─testthat:::expect_condition_matching(...)
 3. │   └─testthat:::quasi_capture(...)
 4. │     ├─testthat (local) .capture(...)
 5. │     │ └─base::withCallingHandlers(...)
 6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
 7. ├─base::print(...)
 8. └─fxl::print.fxl(...)
 9.   └─graphics::par(opar)

[ FAIL 32 | WARN 0 | SKIP 0 | PASS 78 ]
Error: Test failures
Execution halted

P. S. figure margins too large is a known error (though its cause is unknown to me), so not specific to the package.

@miyamot0 miyamot0 self-assigned this Jun 21, 2023
@miyamot0 miyamot0 added the testing Need for debugging and/or unit tests label Jun 21, 2023
@miyamot0
Copy link
Owner

Yeah, I think know what this is. Part of the craziness with supporting annotations across subplots is factoring in padding/margins so that the right coordinates can be inferred. IIRC, R will bug out if certain fonts do not fit within those margins and I don't know if I can pre-specify a specific font.

Can you share some details? Was this a straight up stock run?

@barracuda156
Copy link
Author

@miyamot0 I ran a version from CRAN, but I have just tried from the latest commit, and results are identical. (No patches were applied to the source, if that is what you mean.)

(These were in Rosetta; let me try on a native PowerPC machine, but normally they are identical in terms of failures.)

@barracuda156
Copy link
Author

@miyamot0 Ha, no errors on PowerPC system! Rosetta errors are not worth wasting time on, to be honest. But I wonder what goes wrong on it. (PPC machine has a slightly newer GCC, 12.3.0, but this unlikely to matter here.)

@barracuda156
Copy link
Author

barracuda156 commented Jun 21, 2023

R version 4.3.1 (2023-06-16) -- "Beagle Scouts"
Copyright (C) 2023 The R Foundation for Statistical Computing
Platform: powerpc-apple-darwin10.0.0d2 (32-bit)

> library(testthat)
> library(fxl)
Loading required package: rlang

Attaching package: 'rlang'

The following objects are masked from 'package:testthat':

    is_false, is_null, is_true

Loading required package: grImport
Loading required package: grid
Loading required package: XML
> 
> test_check("fxl")
[ FAIL 0 | WARN 0 | SKIP 0 | PASS 81 ]
> #
> 
> proc.time()
   user  system elapsed 
 57.752   7.619  66.346 

UPD. Hmm, why total number of tests differs? 81 pass here (0 everything else), 78 pass + 32 failures on Rosetta.

@barracuda156 barracuda156 changed the title Many tests fail on 10.6.8 [ FAIL 32 | WARN 0 | SKIP 0 | PASS 78 ] Many tests fail on 10.6.8 Rosetta [ FAIL 32 | WARN 0 | SKIP 0 | PASS 78 ] Jun 21, 2023
@miyamot0
Copy link
Owner

Hmm, I think I may have written tests poorly (still new to unit testing in R). I'll dig into this if there may be a concurrency issue. In my experience, variability between tests is usually my fault.

Thanks for the follow-up -- much appreciated!

@barracuda156
Copy link
Author

@miyamot0 Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing Need for debugging and/or unit tests
Projects
None yet
Development

No branches or pull requests

2 participants