#NEWLINE# def test_non_detached( pyscript ) : #NEWLINE# #INDENT# script = pyscript ( "\n        from daemonocle import Daemon\n\n        def worker():\n            print('hello world')\n\n        daemon = Daemon(worker=worker, prog='foo', detach=False)\n        daemon.do_action('start')\n    " ) #NEWLINE# result = script . run ( ) #NEWLINE# assert ( script . returncode == 0 ) #NEWLINE# assert ( result . stdout == b'Starting foo ... OK\nhello world\nAll children are gone. Parent is exiting...\n' ) #NEWLINE# assert ( result . stderr == b'' )