Changeset 11333:81acfeaa914d in orange


Ignore:
Timestamp:
02/18/13 16:13:51 (14 months ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

Fixed two tests.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/OrangeCanvas/document/tests/test_quickmenu.py

    r11163 r11333  
     1from PyQt4.QtGui import QStringListModel 
    12from PyQt4.QtCore import QPoint 
     3 
    24from ..quickmenu import QuickMenu, SuggestMenuPage, FlattenedTreeItemModel, \ 
    35                        ToolTree, QAction 
    46 
    57from ...gui.test import QAppTestCase 
     8from ...registry import global_registry 
     9from ...registry.qt import QtWidgetRegistry 
    610 
    711 
    812class TestMenu(QAppTestCase): 
    913    def test_menu(self): 
    10         from PyQt4.QtGui import QStringListModel 
    1114        menu = QuickMenu() 
    1215 
     
    3437 
    3538    def test_menu_with_registry(self): 
    36         from ...registry.qt import run_discovery 
     39        registry = QtWidgetRegistry(global_registry()) 
    3740 
    38         registry = run_discovery() 
    3941        menu = QuickMenu() 
    4042        menu.setModel(registry.model()) 
     
    6163 
    6264    def test_search(self): 
    63         from ...registry.qt import run_discovery 
    64  
    65         registry = run_discovery() 
     65        registry = QtWidgetRegistry(global_registry()) 
    6666 
    6767        menu = SuggestMenuPage() 
     
    7474 
    7575    def test_flattened_model(self): 
    76         from PyQt4.QtGui import QStringListModel 
    7776        model = QStringListModel(["0", "1", "2", "3"]) 
    7877        flat = FlattenedTreeItemModel() 
Note: See TracChangeset for help on using the changeset viewer.