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())
def test_be_quiet(self): # Confirm the old API still works be_quiet(True) self.assertEqual(-1, get_verbosity_level()) be_quiet(False) self.assertEqual(0, get_verbosity_level())