File tree 1 file changed +15
-0
lines changed
1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -301,6 +301,7 @@ cd ${workpath}
301
301
[[ ${pkgfile} == * .tar.bz2 ]] && tar xjf ${pkgfile}
302
302
cd pyarmor-$version || csih_error " Invalid pyarmor package file"
303
303
tar xzf ${datafile} || csih_error " Extract data files FAILED"
304
+ cp -a ../../data/package ./ || csih_error " Copy package files FAILED"
304
305
305
306
csih_inform " Prepare for testing"
306
307
echo " "
@@ -483,6 +484,20 @@ $PYTHON pyarmor.py encrypt --with-capsule=project.zip --mode=2 \
483
484
grep -q " foo.hello(2) = 7" result.log \
484
485
|| csih_bug " Case 3.6 FAILED: python script returns unexpected result"
485
486
487
+ csih_inform " Case 3.7: import encrypted package"
488
+ $PYTHON pyarmor.py encrypt --with-capsule=project.zip --in-place \
489
+ --output=build_pkg package/* .py > result.log 2>&1 \
490
+ || csih_bug " Case 3.7 FAILED: return non-zero code"
491
+ (cp -a package build_pkg;
492
+ cd build_pkg && rm package/* .py ;
493
+ cp ../startup.py ./ ;
494
+ sed -i -e ' s/import foo/from package import foo/g' startup.py ;
495
+ $PYTHON startup.py > ../result.log 2>&1 \
496
+ || csih_bug " Case 3.7 FAILED: return non-zero code"
497
+ )
498
+ grep -q " foo.hello(2) = 7" result.log \
499
+ || csih_bug " Case 3.7 FAILED: python script returns unexpected result"
500
+
486
501
#
487
502
# Cross publish
488
503
#
You can’t perform that action at this time.
0 commit comments