Merge pull request #556 from ilvalle/test_pack
test for w2p_pack/w2p_unpack
This commit is contained in:
@@ -25,11 +25,19 @@ class TestPack(unittest.TestCase):
|
|||||||
|
|
||||||
def test_compile(self):
|
def test_compile(self):
|
||||||
from compileapp import compile_application, remove_compiled_application
|
from compileapp import compile_application, remove_compiled_application
|
||||||
|
from gluon.fileutils import w2p_pack, w2p_unpack
|
||||||
import os
|
import os
|
||||||
for appname in ['welcome', 'admin', 'examples']:
|
#apps = ['welcome', 'admin', 'examples']
|
||||||
|
apps = ['welcome']
|
||||||
|
for appname in apps:
|
||||||
appname_path = os.path.join(os.getcwd(), 'applications', appname)
|
appname_path = os.path.join(os.getcwd(), 'applications', appname)
|
||||||
compile_application(appname_path)
|
compile_application(appname_path)
|
||||||
remove_compiled_application(appname_path)
|
remove_compiled_application(appname_path)
|
||||||
|
test_path = os.path.join(os.getcwd(), "%s.w2p" % appname)
|
||||||
|
unpack_path = os.path.join(os.getcwd(), 'unpack', appname)
|
||||||
|
w2p_pack(test_path, appname_path, compiled=True, filenames=None)
|
||||||
|
w2p_pack(test_path, appname_path, compiled=False, filenames=None)
|
||||||
|
w2p_unpack(test_path, unpack_path)
|
||||||
return
|
return
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|||||||
Reference in New Issue
Block a user