Skip to content

getParseData() always returns NULL in IDEs testsΒ #2008

@DanChaltiel

Description

@DanChaltiel

Hi,

My package tests are failing because of this very peculiar bug and I have unfortunately no idea how to debug it.

The following test fails in the RStudio build pane and in Positron test suite, but succeeds in any R console.
Running testthat::test_file() in the console succeeds, but clicking the buttons "Run tests" in the file or "Test" in the Build pane fails.

test_that("multiplication works", {
  # a = getParseData(parse(text="# foobar")) #same result
  a = getParseData(parse(text="a=1"))
  expect_false(is.null(a))
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions