Giter Site home page Giter Site logo

Comments (6)

jfiksel avatar jfiksel commented on August 28, 2024 1

Ah, got it. Ok this should now actually be fixed with 8b48c71

from codalm.

HenrikBengtsson avatar HenrikBengtsson commented on August 28, 2024

Actually, it should be:

oplan <- plan("list")
...
expect_true(identical(plan(), oplan))

from codalm.

jfiksel avatar jfiksel commented on August 28, 2024

Hi Henrik, thank you for taking the time to let us know about this issue. However, even after installing the version of the future package on your GitHub (version 1.19.1), just running

library(future)
oplan <- plan("list")
identical(plan(), oplan)

returns FALSE, while running

library(future)
oplan <- plan()
identical(plan(), oplan)

returns TRUE. So it seems like your most recent comment would cause an error in the testing script, but let me know if this seems wrong.

from codalm.

HenrikBengtsson avatar HenrikBengtsson commented on August 28, 2024

My bad (again), should be:

library(future)
oplan <- plan("list")
identical(plan("list"), oplan)

from codalm.

jfiksel avatar jfiksel commented on August 28, 2024

Excellent, this has been fixed with commit ac0eaa9. Thanks for your help!

from codalm.

HenrikBengtsson avatar HenrikBengtsson commented on August 28, 2024

Almost. Right now you're basically testing identical(plan("list"), plan("list")), no different than testing identical(1, 1). You need to record:

oplan <- plan("list")

at the beginning, before you call your functions that set plan() internally. You can test that it works by setting the environment variable R_FUTURE_PLAN=multisession before running your tests.

from codalm.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.