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

Test no longer needs to sleep after opening Window. #111

Closed
wants to merge 1 commit into from

Conversation

NHDaly
Copy link
Collaborator

@NHDaly NHDaly commented Jan 9, 2018

Speeds up test by removing sleep(5.0).

After #36 was submitted a couple years ago, Window() is synchronous,
so there's no need to sleep() after opening a window in the tests.
EDIT: jk; it was never submitted. D:

After JuliaGizmos#36 was submitted a couple years ago, `Window()` is synchronous,
so there's no need to `sleep()` after opening a window in the tests.
@NHDaly
Copy link
Collaborator Author

NHDaly commented Jan 9, 2018

Oh, jk, I guess you do still need to wait.... It's weird, it passes when I run the file from Juno within Atom, but it indeed fails on the command line:

julia> include("test/runtests.jl")
Error During Test
  Test threw an exception of type MethodError
  Expression: @js(w, Math.log(10))  log(10)
  MethodError: no method matching isapprox(::Dict{String,Any}, ::Float64)
  Closest candidates are:
    isapprox(::Number, ::Number; rtol, atol, nans) at floatfuncs.jl:205
  Stacktrace:
   [1] eval_comparison(::Expr, ::Expr) at ./test.jl:198
   [2] include_from_node1(::String) at ./loading.jl:576
   [3] include(::String) at ./sysimg.jl:14
   [4] eval(::Module, ::Any) at ./boot.jl:235
   [5] eval_user_input(::Any, ::Base.REPL.REPLBackend) at ./REPL.jl:66
   [6] macro expansion at ./REPL.jl:97 [inlined]
   [7] (::Base.REPL.##1#2{Base.REPL.REPLBackend})() at ./event.jl:73
ERROR: LoadError: There was an error during testing
while loading /Users/daly/.julia/v0.6/Blink/test/runtests.jl, in expression starting on line 12

In fact, this seems to still take a few seconds before it works:

julia> w = Window(Blink.@d(:show => false)); @js(w, Math.log(10))
>> Dict{String,Any} with 0 entries

julia> @js(w, Math.log(10))
>> Dict{String,Any} with 0 entries

julia> @js(w, Math.log(10))
>> Dict{String,Any} with 0 entries

julia> @js(w, Math.log(10))
>> Dict{String,Any} with 0 entries

julia> @js(w, Math.log(10))
>> 2.302585092994046

Any idea why this is? Is Window() not actually synchronous? Should we reopen or open a new version of #28?

@NHDaly
Copy link
Collaborator Author

NHDaly commented Jan 9, 2018

Ah, ok i githubbed badly. It's confusing that there's only Closed and Open issues, not Closed, Open, and Fixed... Oops.

Okay so actually, this PR won't work, of course. Should I reopen an Issue for making opening a Window() synchronous? Is there still interest in that? I could combine it with #108 if we want?

@NHDaly NHDaly closed this Jul 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant