proxygen
gtest_color_test.GTestColorTest Class Reference
Inheritance diagram for gtest_color_test.GTestColorTest:

Public Member Functions

def testNoEnvVarNoFlag (self)
 
def testFlagOnly (self)
 
def testEnvVarOnly (self)
 
def testEnvVarAndFlag (self)
 
def testAliasesOfYesAndNo (self)
 
def testNoEnvVarNoFlag (self)
 
def testFlagOnly (self)
 
def testEnvVarOnly (self)
 
def testEnvVarAndFlag (self)
 
def testAliasesOfYesAndNo (self)
 
def testNoEnvVarNoFlag (self)
 
def testFlagOnly (self)
 
def testEnvVarOnly (self)
 
def testEnvVarAndFlag (self)
 
def testAliasesOfYesAndNo (self)
 

Detailed Description

Definition at line 70 of file gtest_color_test.py.

Member Function Documentation

def gtest_color_test.GTestColorTest.testAliasesOfYesAndNo (   self)
Tests using aliases in specifying --gtest_color.

Definition at line 115 of file gtest_color_test.py.

References gtest_test_utils.Main(), and gtest_color_test.UsesColor().

Referenced by gtest_color_test.GTestColorTest.testAliasesOfYesAndNo().

116  """Tests using aliases in specifying --gtest_color."""
117 
118  self.assert_(UsesColor('dumb', None, 'true'))
119  self.assert_(UsesColor('dumb', None, 'YES'))
120  self.assert_(UsesColor('dumb', None, 'T'))
121  self.assert_(UsesColor('dumb', None, '1'))
122 
123  self.assert_(not UsesColor('xterm', None, 'f'))
124  self.assert_(not UsesColor('xterm', None, 'false'))
125  self.assert_(not UsesColor('xterm', None, '0'))
126  self.assert_(not UsesColor('xterm', None, 'unknown'))
127 
128 
def UsesColor(term, color_env_var, color_flag)
def gtest_color_test.GTestColorTest.testAliasesOfYesAndNo (   self)
Tests using aliases in specifying --gtest_color.

Definition at line 115 of file gtest_color_test.py.

References gtest_test_utils.Main(), gtest_color_test.GTestColorTest.testAliasesOfYesAndNo(), and gtest_color_test.UsesColor().

116  """Tests using aliases in specifying --gtest_color."""
117 
118  self.assert_(UsesColor('dumb', None, 'true'))
119  self.assert_(UsesColor('dumb', None, 'YES'))
120  self.assert_(UsesColor('dumb', None, 'T'))
121  self.assert_(UsesColor('dumb', None, '1'))
122 
123  self.assert_(not UsesColor('xterm', None, 'f'))
124  self.assert_(not UsesColor('xterm', None, 'false'))
125  self.assert_(not UsesColor('xterm', None, '0'))
126  self.assert_(not UsesColor('xterm', None, 'unknown'))
127 
128 
def UsesColor(term, color_env_var, color_flag)
def gtest_color_test.GTestColorTest.testAliasesOfYesAndNo (   self)
Tests using aliases in specifying --gtest_color.

Definition at line 115 of file gtest_color_test.py.

References gtest_test_utils.Main(), gtest_color_test.GTestColorTest.testAliasesOfYesAndNo(), and gtest_color_test.UsesColor().

116  """Tests using aliases in specifying --gtest_color."""
117 
118  self.assert_(UsesColor('dumb', None, 'true'))
119  self.assert_(UsesColor('dumb', None, 'YES'))
120  self.assert_(UsesColor('dumb', None, 'T'))
121  self.assert_(UsesColor('dumb', None, '1'))
122 
123  self.assert_(not UsesColor('xterm', None, 'f'))
124  self.assert_(not UsesColor('xterm', None, 'false'))
125  self.assert_(not UsesColor('xterm', None, '0'))
126  self.assert_(not UsesColor('xterm', None, 'unknown'))
127 
128 
def UsesColor(term, color_env_var, color_flag)
def gtest_color_test.GTestColorTest.testEnvVarAndFlag (   self)
Tests the case when there are both GTEST_COLOR and --gtest_color.

Definition at line 108 of file gtest_color_test.py.

References gtest_color_test.GTestColorTest.testEnvVarAndFlag(), and gtest_color_test.UsesColor().

108  def testEnvVarAndFlag(self):
109  """Tests the case when there are both GTEST_COLOR and --gtest_color."""
110 
111  self.assert_(not UsesColor('xterm-color', 'no', 'no'))
112  self.assert_(UsesColor('dumb', 'no', 'yes'))
113  self.assert_(UsesColor('xterm-color', 'no', 'auto'))
114 
def UsesColor(term, color_env_var, color_flag)
def gtest_color_test.GTestColorTest.testEnvVarAndFlag (   self)
Tests the case when there are both GTEST_COLOR and --gtest_color.

Definition at line 108 of file gtest_color_test.py.

References gtest_color_test.UsesColor().

Referenced by gtest_color_test.GTestColorTest.testEnvVarAndFlag().

108  def testEnvVarAndFlag(self):
109  """Tests the case when there are both GTEST_COLOR and --gtest_color."""
110 
111  self.assert_(not UsesColor('xterm-color', 'no', 'no'))
112  self.assert_(UsesColor('dumb', 'no', 'yes'))
113  self.assert_(UsesColor('xterm-color', 'no', 'auto'))
114 
def UsesColor(term, color_env_var, color_flag)
def gtest_color_test.GTestColorTest.testEnvVarAndFlag (   self)
Tests the case when there are both GTEST_COLOR and --gtest_color.

Definition at line 108 of file gtest_color_test.py.

References gtest_color_test.GTestColorTest.testEnvVarAndFlag(), and gtest_color_test.UsesColor().

108  def testEnvVarAndFlag(self):
109  """Tests the case when there are both GTEST_COLOR and --gtest_color."""
110 
111  self.assert_(not UsesColor('xterm-color', 'no', 'no'))
112  self.assert_(UsesColor('dumb', 'no', 'yes'))
113  self.assert_(UsesColor('xterm-color', 'no', 'auto'))
114 
def UsesColor(term, color_env_var, color_flag)
def gtest_color_test.GTestColorTest.testEnvVarOnly (   self)
Tests the case when there's GTEST_COLOR but not --gtest_color.

Definition at line 97 of file gtest_color_test.py.

References gtest_color_test.GTestColorTest.testEnvVarOnly(), and gtest_color_test.UsesColor().

97  def testEnvVarOnly(self):
98  """Tests the case when there's GTEST_COLOR but not --gtest_color."""
99 
100  self.assert_(not UsesColor('dumb', 'no', None))
101  self.assert_(not UsesColor('xterm-color', 'no', None))
102  if not IS_WINDOWS:
103  self.assert_(not UsesColor('dumb', 'auto', None))
104  self.assert_(UsesColor('xterm-color', 'auto', None))
105  self.assert_(UsesColor('dumb', 'yes', None))
106  self.assert_(UsesColor('xterm-color', 'yes', None))
107 
def UsesColor(term, color_env_var, color_flag)
def gtest_color_test.GTestColorTest.testEnvVarOnly (   self)
Tests the case when there's GTEST_COLOR but not --gtest_color.

Definition at line 97 of file gtest_color_test.py.

References gtest_color_test.GTestColorTest.testEnvVarOnly(), and gtest_color_test.UsesColor().

97  def testEnvVarOnly(self):
98  """Tests the case when there's GTEST_COLOR but not --gtest_color."""
99 
100  self.assert_(not UsesColor('dumb', 'no', None))
101  self.assert_(not UsesColor('xterm-color', 'no', None))
102  if not IS_WINDOWS:
103  self.assert_(not UsesColor('dumb', 'auto', None))
104  self.assert_(UsesColor('xterm-color', 'auto', None))
105  self.assert_(UsesColor('dumb', 'yes', None))
106  self.assert_(UsesColor('xterm-color', 'yes', None))
107 
def UsesColor(term, color_env_var, color_flag)
def gtest_color_test.GTestColorTest.testEnvVarOnly (   self)
Tests the case when there's GTEST_COLOR but not --gtest_color.

Definition at line 97 of file gtest_color_test.py.

References gtest_color_test.UsesColor().

Referenced by gtest_color_test.GTestColorTest.testEnvVarOnly().

97  def testEnvVarOnly(self):
98  """Tests the case when there's GTEST_COLOR but not --gtest_color."""
99 
100  self.assert_(not UsesColor('dumb', 'no', None))
101  self.assert_(not UsesColor('xterm-color', 'no', None))
102  if not IS_WINDOWS:
103  self.assert_(not UsesColor('dumb', 'auto', None))
104  self.assert_(UsesColor('xterm-color', 'auto', None))
105  self.assert_(UsesColor('dumb', 'yes', None))
106  self.assert_(UsesColor('xterm-color', 'yes', None))
107 
def UsesColor(term, color_env_var, color_flag)
def gtest_color_test.GTestColorTest.testFlagOnly (   self)
Tests the case when there's --gtest_color but not GTEST_COLOR.

Definition at line 86 of file gtest_color_test.py.

References gtest_color_test.GTestColorTest.testFlagOnly(), and gtest_color_test.UsesColor().

86  def testFlagOnly(self):
87  """Tests the case when there's --gtest_color but not GTEST_COLOR."""
88 
89  self.assert_(not UsesColor('dumb', None, 'no'))
90  self.assert_(not UsesColor('xterm-color', None, 'no'))
91  if not IS_WINDOWS:
92  self.assert_(not UsesColor('emacs', None, 'auto'))
93  self.assert_(UsesColor('xterm', None, 'auto'))
94  self.assert_(UsesColor('dumb', None, 'yes'))
95  self.assert_(UsesColor('xterm', None, 'yes'))
96 
def UsesColor(term, color_env_var, color_flag)
def gtest_color_test.GTestColorTest.testFlagOnly (   self)
Tests the case when there's --gtest_color but not GTEST_COLOR.

Definition at line 86 of file gtest_color_test.py.

References gtest_color_test.GTestColorTest.testFlagOnly(), and gtest_color_test.UsesColor().

86  def testFlagOnly(self):
87  """Tests the case when there's --gtest_color but not GTEST_COLOR."""
88 
89  self.assert_(not UsesColor('dumb', None, 'no'))
90  self.assert_(not UsesColor('xterm-color', None, 'no'))
91  if not IS_WINDOWS:
92  self.assert_(not UsesColor('emacs', None, 'auto'))
93  self.assert_(UsesColor('xterm', None, 'auto'))
94  self.assert_(UsesColor('dumb', None, 'yes'))
95  self.assert_(UsesColor('xterm', None, 'yes'))
96 
def UsesColor(term, color_env_var, color_flag)
def gtest_color_test.GTestColorTest.testFlagOnly (   self)
Tests the case when there's --gtest_color but not GTEST_COLOR.

Definition at line 86 of file gtest_color_test.py.

References gtest_color_test.UsesColor().

Referenced by gtest_color_test.GTestColorTest.testFlagOnly().

86  def testFlagOnly(self):
87  """Tests the case when there's --gtest_color but not GTEST_COLOR."""
88 
89  self.assert_(not UsesColor('dumb', None, 'no'))
90  self.assert_(not UsesColor('xterm-color', None, 'no'))
91  if not IS_WINDOWS:
92  self.assert_(not UsesColor('emacs', None, 'auto'))
93  self.assert_(UsesColor('xterm', None, 'auto'))
94  self.assert_(UsesColor('dumb', None, 'yes'))
95  self.assert_(UsesColor('xterm', None, 'yes'))
96 
def UsesColor(term, color_env_var, color_flag)
def gtest_color_test.GTestColorTest.testNoEnvVarNoFlag (   self)
Tests the case when there's neither GTEST_COLOR nor --gtest_color.

Definition at line 71 of file gtest_color_test.py.

References gtest_color_test.UsesColor().

Referenced by gtest_color_test.GTestColorTest.testNoEnvVarNoFlag().

71  def testNoEnvVarNoFlag(self):
72  """Tests the case when there's neither GTEST_COLOR nor --gtest_color."""
73 
74  if not IS_WINDOWS:
75  self.assert_(not UsesColor('dumb', None, None))
76  self.assert_(not UsesColor('emacs', None, None))
77  self.assert_(not UsesColor('xterm-mono', None, None))
78  self.assert_(not UsesColor('unknown', None, None))
79  self.assert_(not UsesColor(None, None, None))
80  self.assert_(UsesColor('linux', None, None))
81  self.assert_(UsesColor('cygwin', None, None))
82  self.assert_(UsesColor('xterm', None, None))
83  self.assert_(UsesColor('xterm-color', None, None))
84  self.assert_(UsesColor('xterm-256color', None, None))
85 
def UsesColor(term, color_env_var, color_flag)
def gtest_color_test.GTestColorTest.testNoEnvVarNoFlag (   self)
Tests the case when there's neither GTEST_COLOR nor --gtest_color.

Definition at line 71 of file gtest_color_test.py.

References gtest_color_test.GTestColorTest.testNoEnvVarNoFlag(), and gtest_color_test.UsesColor().

71  def testNoEnvVarNoFlag(self):
72  """Tests the case when there's neither GTEST_COLOR nor --gtest_color."""
73 
74  if not IS_WINDOWS:
75  self.assert_(not UsesColor('dumb', None, None))
76  self.assert_(not UsesColor('emacs', None, None))
77  self.assert_(not UsesColor('xterm-mono', None, None))
78  self.assert_(not UsesColor('unknown', None, None))
79  self.assert_(not UsesColor(None, None, None))
80  self.assert_(UsesColor('linux', None, None))
81  self.assert_(UsesColor('cygwin', None, None))
82  self.assert_(UsesColor('xterm', None, None))
83  self.assert_(UsesColor('xterm-color', None, None))
84  self.assert_(UsesColor('xterm-256color', None, None))
85 
def UsesColor(term, color_env_var, color_flag)
def gtest_color_test.GTestColorTest.testNoEnvVarNoFlag (   self)
Tests the case when there's neither GTEST_COLOR nor --gtest_color.

Definition at line 71 of file gtest_color_test.py.

References gtest_color_test.GTestColorTest.testNoEnvVarNoFlag(), and gtest_color_test.UsesColor().

71  def testNoEnvVarNoFlag(self):
72  """Tests the case when there's neither GTEST_COLOR nor --gtest_color."""
73 
74  if not IS_WINDOWS:
75  self.assert_(not UsesColor('dumb', None, None))
76  self.assert_(not UsesColor('emacs', None, None))
77  self.assert_(not UsesColor('xterm-mono', None, None))
78  self.assert_(not UsesColor('unknown', None, None))
79  self.assert_(not UsesColor(None, None, None))
80  self.assert_(UsesColor('linux', None, None))
81  self.assert_(UsesColor('cygwin', None, None))
82  self.assert_(UsesColor('xterm', None, None))
83  self.assert_(UsesColor('xterm-color', None, None))
84  self.assert_(UsesColor('xterm-256color', None, None))
85 
def UsesColor(term, color_env_var, color_flag)

The documentation for this class was generated from the following file: