Skip to content

Commit 220ff01

Browse files
committed
test: Stop registering kernel in startup class method
1 parent 886869a commit 220ff01

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

test/helper.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
require "test/unit/rr"
88
require "tmpdir"
99

10-
1110
IRuby.logger = IRuby::MultiLogger.new(*Logger.new(STDERR, level: Logger::Severity::INFO))
1211

1312
module IRubyTest
@@ -27,9 +26,8 @@ def self.startup
2726
@__work_dir = Dir.mktmpdir("iruby-test-data")
2827

2928
@__jupyter_data_dir = File.join(@__work_dir, "jupyter")
29+
@__save_jupyter_data_dir = ENV["JUPYTER_DATA_DIR"]
3030
ENV["JUPYTER_DATA_DIR"] = @__jupyter_data_dir
31-
system(RUBY, "-I#{LIB_DIR}", IRUBY_PATH, "register",
32-
err: :out, out: File::NULL)
3331

3432
@__config_dir = File.join(@__work_dir, "config")
3533
@__config_path = Pathname.new(@__config_dir) + "config.json"
@@ -51,6 +49,7 @@ def self.startup
5149

5250
def self.shutdown
5351
FileUtils.remove_entry_secure(@__work_dir)
52+
ENV["JUPYTER_DATA_DIR"] = @__save_jupyter_data_dir
5453
end
5554

5655
def self.test_config_filename

test/iruby/application/helper.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
require "helper"
2-
require "iruby/application"
32
require "open3"
43
require "rbconfig"
54

5+
require "iruby/application"
6+
67
module IRubyTest
78
module ApplicationTests
89
class ApplicationTestBase < TestBase

0 commit comments

Comments
 (0)