~ubuntu-branches/ubuntu/karmic/quodlibet/karmic

« back to all changes in this revision

Viewing changes to tests/test_qltk_completion.py

  • Committer: Bazaar Package Importer
  • Author(s): Luca Falavigna
  • Date: 2009-01-30 23:55:34 UTC
  • mfrom: (1.1.12 upstream)
  • Revision ID: james.westby@ubuntu.com-20090130235534-l4e72ulw0vqfo17w
Tags: 2.0-1ubuntu1
* Merge from Debian experimental (LP: #276856), remaining Ubuntu changes:
  + debian/patches/40-use-music-profile.patch:
    - Use the "Music and Movies" pipeline per default.
* Refresh the above patch for new upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
from tests import TestCase, add
 
2
 
 
3
import gtk
 
4
 
 
5
from quodlibet.library import SongLibrary
 
6
from quodlibet.qltk.completion import EntryWordCompletion, LibraryTagCompletion
 
7
 
 
8
class TEntryWordCompletion(TestCase):
 
9
    def test_ctr(self):
 
10
        w = EntryWordCompletion()
 
11
        e = gtk.Entry()
 
12
        e.set_completion(w)
 
13
        self.failUnlessEqual(w.get_entry(), e)
 
14
        self.failUnlessEqual(e.get_completion(), w)
 
15
        e.destroy()
 
16
add(TEntryWordCompletion)
 
17
 
 
18
class TLibraryTagCompletion(TestCase):
 
19
    def test_ctr(self):
 
20
        w = LibraryTagCompletion(SongLibrary())
 
21
        e = gtk.Entry()
 
22
        e.set_completion(w)
 
23
        self.failUnlessEqual(w.get_entry(), e)
 
24
        self.failUnlessEqual(e.get_completion(), w)
 
25
        e.destroy()
 
26
add(TLibraryTagCompletion)