Exemple #1
0
def test_log_wf(infopl, alfred4):
    """Workflow and Logger objects correct"""
    wf = notify.wf()
    assert isinstance(wf, Workflow), "not Workflow"
    # Always returns the same objects
    wf2 = notify.wf()
    assert wf is wf2, "not same Workflow"

    log = notify.log()
    assert isinstance(log, logging.Logger), "not Logger"
    log2 = notify.log()
    assert log is log2, "not same Logger"
def test_log_wf(infopl, alfred4):
    """Workflow and Logger objects correct"""
    wf = notify.wf()
    assert isinstance(wf, Workflow), "not Workflow"
    # Always returns the same objects
    wf2 = notify.wf()
    assert wf is wf2, "not same Workflow"

    log = notify.log()
    assert isinstance(log, logging.Logger), "not Logger"
    log2 = notify.log()
    assert log is log2, "not same Logger"
    def test_log_wf(self):
        """Workflow and Logger objects correct"""
        with InfoPlist():
            wf = notify.wf()
            self.assert_(isinstance(wf, Workflow))
            # Always returns the same objects
            wf2 = notify.wf()
            self.assert_(wf is wf2)

            log = notify.log()
            self.assert_(isinstance(log, logging.Logger))
            log2 = notify.log()
            self.assert_(log is log2)
Exemple #4
0
def test_paths(infopl, alfred4):
    """Module paths are correct"""
    assert DATADIR == notify.wf().datadir, "unexpected datadir"
    assert APPLET_PATH == notify.notifier_program(), "unexpected applet path"
    assert ICON_PATH == notify.notifier_icon_path(), "unexpected icon path"
def test_paths(infopl, alfred4):
    """Module paths are correct"""
    assert DATADIR == notify.wf().datadir, "unexpected datadir"
    assert APPLET_PATH == notify.notifier_program(), "unexpected applet path"
    assert ICON_PATH == notify.notifier_icon_path(), "unexpected icon path"
 def test_paths(self):
     """Module paths are correct"""
     with InfoPlist():
         self.assertEqual(DATADIR, notify.wf().datadir)
         self.assertEqual(APPLET_PATH, notify.notifier_program())
         self.assertEqual(ICON_PATH, notify.notifier_icon_path())