示例#1
0
    def test_noise_control_daemonize(self):
        options = self.DEFAULTS
        options['quiet'] = True
        options['daemonize'] = True
        stdout = sys.stdout
        stderr = sys.stderr
        redirect = ux.noiseControl(options)
        self.assertEqual(sys.stdout.name, stdout.name)
        self.assertEqual(sys.stderr.name, stderr.name)

        self.assertEqual(redirect, None)
示例#2
0
    def test_noise_control_daemonize(self):
        options = self.DEFAULTS
        options['quiet'] = True
        options['daemonize'] = True
        stdout = sys.stdout
        stderr = sys.stderr
        redirect = ux.noiseControl(options)
        self.assertEqual(sys.stdout.name, stdout.name)
        self.assertEqual(sys.stderr.name, stderr.name)

        self.assertEqual(redirect, None)
示例#3
0
    def test_noise_control_quiet(self):
        options = self.DEFAULTS
        options['quiet'] = True
        stdout = sys.stdout
        stderr = sys.stderr
        redirect = ux.noiseControl(options)
        self.assertEqual(sys.stdout.name, self.devnull.name)
        self.assertEqual(sys.stderr.name, self.devnull.name)
        sys.stdout = stdout
        sys.stderr = stderr

        self.assertEqual(redirect.name, self.devnull.name)