def process(lib_file, req_file, packages_and_files): # real work: std_deps = cherry_pick_lib(lib_file, req_file) pack = pack_up(packages_and_files) # merge all std_deps.update(pack) make_brython_modules(std_deps)
def test_make_brython_modules_log(self): vfs = { 'testmodule': ['.py', 'print("hello world")'], 'testjs': ['.js', 'console.log("hello world");'] } utils.make_brython_modules(vfs) with open('brython_modules.log.txt', 'r') as f: self.assertMultiLineEqual(TEST_MODULE_LOG, f.read())
def test_make_brython_modules_log(self): vfs = { "testmodule": [".py", 'print("hello world")'], "testjs": [".js", 'console.log("hello world");'], } utils.make_brython_modules(vfs) with open("brython_modules.log.txt", "r") as f: self.assertMultiLineEqual(TEST_MODULE_LOG, f.read())
def test_make_brython_modules_js(self): vfs = {'testjs': ['.js', 'console.log("hello world");']} utils.make_brython_modules(vfs) with open('brython_modules.js', 'r') as f: content = f.read() assert 'testjs' in content
def test_make_brython_modules_js(self): vfs = {"testjs": [".js", 'console.log("hello world");']} utils.make_brython_modules(vfs) with open("brython_modules.js", "r") as f: content = f.read() assert "testjs" in content