def test_daemon_not_passed(): with TestApp(extensions=['daemon']) as app: app.config.set('daemon', 'pid_file', None) try: app.run() finally: ext_daemon.cleanup(app)
def test_daemon_not_passed(self): app = self.make_app(APP, extensions=['daemon']) app.setup() app.config.set('daemon', 'pid_file', None) try: app.run() finally: ext_daemon.cleanup(app)
def target(): with TestApp(argv=['--daemon'], extensions=['daemon']) as app: app.config.set('daemon', 'pid_file', tmp.file) try: # FIX ME: Can't daemonize, because nose/pytest lose sight of it app.daemonize() app.run() finally: app.close() ext_daemon.cleanup(app)
def target(): app = self.make_app('test', argv=['--daemon'], extensions=['daemon']) app.setup() app.config.set('daemon', 'pid_file', self.tmp_file) try: # FIX ME: Can't daemonize, because nose loses sight of it app.daemonize() app.run() finally: app.close() ext_daemon.cleanup(app)
def target(): app = self.make_app('test', argv=['--daemon'], extensions=['daemon']) app.setup() app.config.set('daemon', 'pid_file', tmpfile) try: ### FIX ME: Can't daemonize, because nose loses sight of it app.daemonize() app.run() finally: app.close() ext_daemon.cleanup(app)
def test_daemon(self): (_, tmpfile) = tempfile.mkstemp() os.remove(tmpfile) app = self.make_app('test', argv=['--daemon'], extensions=['daemon']) app.setup() app.config.set('daemon', 'pid_file', tmpfile) try: ### FIX ME: Can't daemonize, because nose loses sight of it #app.daemonize() app.run() finally: app.close() ext_daemon.cleanup(app)