[Modeling-cvs] ProjectModeling/Modeling/tests test_FetchSpecification.py,NONE,1.1 run.py,1.11,1.12
Status: Abandoned
Brought to you by:
sbigaret
From: Sebastien B. <sbi...@us...> - 2004-09-21 18:03:38
|
Update of /cvsroot/modeling/ProjectModeling/Modeling/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15040/Modeling/tests Modified Files: run.py Added Files: test_FetchSpecification.py Log Message: Fixed bug #916019: FetchSpecification did not detect when an entity has no ClassDescription (usually meaning either a typo or a model not loaded yet), but assumed that one exists in setQualifier() --leading to an error in Qualifier.validateKeysWithRootClassDescription() that was not informative at all for the developer. Index: run.py =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/Modeling/tests/run.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** run.py 2 Aug 2004 20:54:47 -0000 1.11 --- run.py 21 Sep 2004 18:03:27 -0000 1.12 *************** *** 45,48 **** --- 45,49 ---- import test_Validation import test_Qualifier + import test_FetchSpecification import test_SortOrderings import test_ObserverCenter --- NEW FILE: test_FetchSpecification.py --- #! /usr/bin/env python # -*- coding: iso-8859-1 -*- #----------------------------------------------------------------------------- # Modeling Framework: an Object-Relational Bridge for python # # Copyright (c) 2001-2004 Sébastien Bigaret <sbi...@us...> # All rights reserved. # # This file is part of the Modeling Framework. # # This code is distributed under a "3-clause BSD"-style license; # see the LICENSE file for details. #----------------------------------------------------------------------------- """ Tests for FetchSpecification """ import unittest if __name__ == "__main__": import utils, sys utils.fixpath() from Modeling.FetchSpecification import FetchSpecification class TestFetchSpecification(unittest.TestCase): """ Tests for FetchSpecification """ def test_01_detect_when_no_such_entity_is_loaded(self): "[FetchSpecification] detects when the corresponding entity is not loaded" # bug #916019 self.assertRaises(ValueError, FetchSpecification,'unknown') def test_suite(): suite = unittest.TestSuite() suite.addTest(unittest.makeSuite(TestFetchSpecification, "test_")) return suite if __name__ == "__main__": errs = utils.run_suite(test_suite()) sys.exit(errs and 1 or 0) |