# Copyright (c) 2000-2004 LOGILAB S.A. (Paris, FRANCE). # http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later # version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # this program; if not, write to the Free Software Foundation, Inc., # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. """ unittest for visitors.diadefs and extensions.diadefslib modules """ __revision__ = "$Id: unittest_vcg.py,v 1.7 2005/04/15 11:00:49 syt Exp $" import unittest from logilab.common.astng.inspector import Linker from pyreverse.extensions.diadefslib import DefaultDiadefGenerator from pyreverse.extensions.diagrams import set_counter from pyreverse.extensions.vcgutils import VCGWriter from utils import FileTC, build_file_case, get_project project = get_project('data') linker = Linker(project) set_counter(0) dd = DefaultDiadefGenerator(linker).visit(project) for diagram in dd: diagram.extract_relationships() class VCGWriterTC(FileTC): generated_files = (#'No name package diagram'.replace(' ', '_') + '.vcg', 'packages_No_Name.vcg', 'classes_No_Name.vcg',) def setUp(self): FileTC.setUp(self) writer = VCGWriter() writer.write(project, dd) build_file_case(VCGWriterTC) if __name__ == '__main__': unittest.main()