[Modeling-cvs] ProjectModeling/Modeling/tests test_generate_python_code.sh,1.4,1.5
Status: Abandoned
Brought to you by:
sbigaret
From: <sbi...@us...> - 2003-11-11 14:51:25
|
Update of /cvsroot/modeling/ProjectModeling/Modeling/tests In directory sc8-pr-cvs1:/tmp/cvs-serv14689 Modified Files: test_generate_python_code.sh Log Message: Added detection code for ticket #839231 Index: test_generate_python_code.sh =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/Modeling/tests/test_generate_python_code.sh,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** test_generate_python_code.sh 3 Aug 2003 12:49:58 -0000 1.4 --- test_generate_python_code.sh 11 Nov 2003 14:51:21 -0000 1.5 *************** *** 32,39 **** --- 32,73 ---- } + function check_success() { + if [ $? -ne 0 ]; then + echo "ERROR: Failed: $1" 1>&2 + else + echo "OK: Success: $1" + fi + } + function check_failure() { + if [ $? -ne 0 ]; then + echo "OK: Failed: $1" 1>&2 + else + echo "ERROR: Success: $1" + fi + } + function test_AuthorBooks() { execute $PYTHON ./test_EditingContext_Global.py } function test_StoreEmployees() { + # Bug #839231: impossible to load classes w/ sub-classes prior to classes + # w/o subclasses. So we test here that we can load every possible + # module/class in the generated package + # Note: fix_StoreEmployees() is needed before this, just like the test.py + # does. + cd testPackages + TEST_IMPORT="from StoreEmployees.Store import Store" + $PYTHON -c "$TEST_IMPORT" ; check_success "$TEST_IMPORT" + TEST_IMPORT="from StoreEmployees.Employee import Employee" + $PYTHON -c "$TEST_IMPORT" ; check_success "$TEST_IMPORT" + TEST_IMPORT="from StoreEmployees.SalesClerk import SalesClerk" + $PYTHON -c "$TEST_IMPORT" ; check_success "$TEST_IMPORT" + TEST_IMPORT="from StoreEmployees.Executive import Executive" + $PYTHON -c "$TEST_IMPORT" ; check_success "$TEST_IMPORT" + TEST_IMPORT="from StoreEmployees.Mark import Mark" + $PYTHON -c "$TEST_IMPORT" ; check_success "$TEST_IMPORT" + TEST_IMPORT="from StoreEmployees.Holidays import Holidays" + $PYTHON -c "$TEST_IMPORT" ; check_success "$TEST_IMPORT" + cd .. execute $PYTHON ./test_EditingContext_Global_Inheritance.py } *************** *** 50,67 **** } - function check_success() { - if [ $? -ne 0 ]; then - echo "ERROR: Failed: $1" 1>&2 - else - echo "OK: Success: $1" - fi - } - function check_failure() { - if [ $? -ne 0 ]; then - echo "OK: Failed: $1" 1>&2 - else - echo "ERROR: Success: $1" - fi - } function generate() { execute $PYTHON $GENERATE $* --- 84,87 ---- |