Esempio n. 1
0
    def test_pref(self):
        man = BackendLoader()
        man.force(None)

        man.set_preference(['imagemagick', 'scrot'])
        eq_(man.selected().name, 'imagemagick')

        man.set_preference(['imagemagick', 'scrot', 'imagemagick'])
        eq_(man.selected().name, 'imagemagick')

        man.set_preference(['imagemagick'])
        eq_(man.selected().name, 'imagemagick')

        man.set_preference(['pygtk', 'imagemagick', 'scrot'])
        eq_(man.selected().name, 'pygtk')

        man.set_preference(['scrot', 'imagemagick'])
        eq_(man.selected().name, 'scrot')

        man.set_preference(['scrot', 'imagemagick', 'pygtk'])
        eq_(man.selected().name, 'scrot')

        man.set_preference(['scrot', 'imagemagick', 'scrot'])
        eq_(man.selected().name, 'scrot')

        man.set_preference(['scrot'])
        eq_(man.selected().name, 'scrot')
Esempio n. 2
0
    def test_pref(self):
        man = BackendLoader()
        man.force(None)

        man.set_preference(['imagemagick', 'scrot'])
        eq_(man.selected().name, 'imagemagick')

        man.set_preference(['imagemagick', 'scrot', 'imagemagick'])
        eq_(man.selected().name, 'imagemagick')

        man.set_preference(['imagemagick'])
        eq_(man.selected().name, 'imagemagick')

        man.set_preference(['pygtk', 'imagemagick', 'scrot'])
        eq_(man.selected().name, 'pygtk')

        man.set_preference(['scrot', 'imagemagick'])
        eq_(man.selected().name, 'scrot')

        man.set_preference(['scrot', 'imagemagick', 'pygtk'])
        eq_(man.selected().name, 'scrot')

        man.set_preference(['scrot', 'imagemagick', 'scrot'])
        eq_(man.selected().name, 'scrot')

        man.set_preference(['scrot'])
        eq_(man.selected().name, 'scrot')
Esempio n. 3
0
def print_versions():
    print_name('pyscreenshot')
    print pyscreenshot.__version__
    man=BackendLoader()
    for name in man.all_names:
        man.force(name)
        print_name(name)
        try :
            x=man.selected()
            print x.backend_version()
        except Exception:
            print 'missing'
Esempio n. 4
0
def print_versions():
    print_name('pyscreenshot')
    print pyscreenshot.__version__
    man = BackendLoader()
    for name in man.all_names:
        man.force(name)
        print_name(name)
        try:
            x = man.selected()
            print x.backend_version()
        except Exception:
            print 'missing'
Esempio n. 5
0
 def test_mix(self):
     man = BackendLoader()
     man.force('scrot')
     man.set_preference(['imagemagick', 'scrot'])
     eq_(man.selected().name, 'scrot')
Esempio n. 6
0
 def test_force(self):
     man = BackendLoader()
     for name in ['imagemagick', 'scrot', 'pygtk', 'pyqt', 'wx']:
         man.force(name)
         eq_(man.selected().name, name)
         man.force(None)  # for other tests
Esempio n. 7
0
 def test_mix(self):
     man = BackendLoader()
     man.force('scrot')
     man.set_preference(['imagemagick', 'scrot'])
     eq_(man.selected().name, 'scrot')
Esempio n. 8
0
 def test_force(self):
     man = BackendLoader()
     for name in ['imagemagick', 'scrot', 'pygtk', 'pyqt', 'wx']:
         man.force(name)
         eq_(man.selected().name, name)
         man.force(None)  # for other tests