Пример #1
0
 def test_verbosity_level(self):
     set_verbosity_level(1)
     self.assertEqual(1, get_verbosity_level())
     self.assertTrue(is_verbose())
     self.assertFalse(is_quiet())
     set_verbosity_level(-1)
     self.assertEqual(-1, get_verbosity_level())
     self.assertFalse(is_verbose())
     self.assertTrue(is_quiet())
     set_verbosity_level(0)
     self.assertEqual(0, get_verbosity_level())
     self.assertFalse(is_verbose())
     self.assertFalse(is_quiet())
Пример #2
0
 def test_verbosity_level(self):
     set_verbosity_level(1)
     self.assertEqual(1, get_verbosity_level())
     self.assertTrue(is_verbose())
     self.assertFalse(is_quiet())
     set_verbosity_level(-1)
     self.assertEqual(-1, get_verbosity_level())
     self.assertFalse(is_verbose())
     self.assertTrue(is_quiet())
     set_verbosity_level(0)
     self.assertEqual(0, get_verbosity_level())
     self.assertFalse(is_verbose())
     self.assertFalse(is_quiet())
Пример #3
0
 def adjust_verbosity(cmd):
     if is_quiet():
         cmd += ['-q']
     if is_verbose():
         cmd += ['-v']