Browse Source

[master] tweak TestOSEnv just like stats-httpd_test to suppress log leak

also renamed the stats-httpd_test counterpart; it seemed to be tenntatively
named and left unchanged, so doesn't really make sense for what it does.

these should be trivial, so I'm committing this at my discretion.
JINMEI Tatuya 12 years ago
parent
commit
d2861efce4
2 changed files with 5 additions and 2 deletions
  1. 1 1
      src/bin/stats/tests/stats-httpd_test.py
  2. 4 1
      src/bin/stats/tests/stats_test.py

+ 1 - 1
src/bin/stats/tests/stats-httpd_test.py

@@ -1104,7 +1104,7 @@ class TestStatsHttpd(unittest.TestCase):
         self.assertEqual('@description', stats_xsl[2].find('%sif' % nst).attrib['test'])
         self.assertEqual('@description', stats_xsl[2].find('%sif' % nst).attrib['test'])
         self.assertEqual('@description', stats_xsl[2].find('%sif/%svalue-of' % ((nst,)*2)).attrib['select'])
         self.assertEqual('@description', stats_xsl[2].find('%sif/%svalue-of' % ((nst,)*2)).attrib['select'])
 
 
-class Z_TestStatsHttpdError(unittest.TestCase):
+class Z_TestOSEnv(unittest.TestCase):
     def test_for_without_B10_FROM_SOURCE(self):
     def test_for_without_B10_FROM_SOURCE(self):
         # Note: this test is sensitive due to its substantial side effect of
         # Note: this test is sensitive due to its substantial side effect of
         # reloading.  For exmaple, it affects tests that tweak module
         # reloading.  For exmaple, it affects tests that tweak module

+ 4 - 1
src/bin/stats/tests/stats_test.py

@@ -1401,7 +1401,10 @@ class TestStats(unittest.TestCase):
              stat.statistics_data['Init'],
              stat.statistics_data['Init'],
              {'boot_time': self.const_default_datetime})
              {'boot_time': self.const_default_datetime})
 
 
-class TestOSEnv(unittest.TestCase):
+class Z_TestOSEnv(unittest.TestCase):
+    # Running this test would break logging setting.  To prevent it from
+    # affecting other tests we use the same workaround as
+    # Z_TestStatsHttpdError.
     def test_osenv(self):
     def test_osenv(self):
         """
         """
         test for the environ variable "B10_FROM_SOURCE"
         test for the environ variable "B10_FROM_SOURCE"