Skip to content

Commit

Permalink
Fix test recent files when using python runtest.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ColinDuquesnoy committed Aug 2, 2015
1 parent 6693581 commit 21df190
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/test_widgets/test_recent_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import pyqode.core



def test_open_file():
manager = RecentFilesManager('pyQode', 'test')
manager.clear()
Expand Down Expand Up @@ -32,16 +33,16 @@ def test_max_files():
manager.max_recent_files = 1
manager.open_file(__file__)
assert manager.last_file() == __file__
manager.open_file(pytest.__file__)
assert manager.last_file() == pytest.__file__
manager.open_file(pyqode.core.__file__)
assert manager.last_file() == pyqode.core.__file__
assert len(manager.get_recent_files()) == 1


def test_menu_recent_files():
manager = RecentFilesManager('pyQode', 'test')
manager.clear()
manager.open_file(__file__)
manager.open_file(pytest.__file__)
manager.open_file(pyqode.core.__file__)
mnu = MenuRecentFiles(None, recent_files_manager=manager, title='Recents',
icon_provider=None, clear_icon=None)
mnu.show()
Expand Down

0 comments on commit 21df190

Please sign in to comment.