Exemple #1
0
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)
Exemple #2
0
 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())
Exemple #3
0
 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())
Exemple #4
0
 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
Exemple #5
0
 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