Simple godot import variable?

I would love some help to understand. I have a script

var test = 7

I want to import that and print that in

extends EditorScript

func _run():
	var script = load("res://")

When executed I get

 res:// - Invalid get index 'test' (on base: 'GDScript').

You loaded the resource (the GDScript class) you need to create a instance of that class with new()

func _run():
	var script = load("res://").new()