

def test_runner_uses_source_from_filename(self):
    doc = Document()
    source = '# Test contents for script'
    result = {
        
    }

    def load(filename):
        handler = ScriptHandler(filename=filename)
        handler.modify_document(doc)
        result['handler'] = handler
        result['filename'] = filename
    _with_script_contents(source, load)
    assert (result['handler']._runner.path == result['filename'])
    assert (result['handler']._runner.source == result)
    assert (not doc.roots)

dataset/ETHPy150Open bokeh/bokeh/bokeh/application/handlers/tests/test_script.py TestScriptHandler.test_runner_uses_source_from_filename/VarMisuse@102/135 `source`->`result`