瀏覽代碼

Group all [include] tests together

Mike Naberezny 9 年之前
父節點
當前提交
a350d25568
共有 1 個文件被更改,包括 14 次插入14 次删除
  1. 14 14
      supervisor/tests/test_options.py

+ 14 - 14
supervisor/tests/test_options.py

@@ -890,7 +890,7 @@ class ServerOptionsTests(unittest.TestCase):
         msg = 'Included extra file "%s" during parsing' % ini_file
         self.assertTrue(msg in instance.parse_infos)
 
-    def test_include_reads_files_in_sorted_order(self):
+    def test_read_config_include_reads_files_in_sorted_order(self):
         dirname = tempfile.mkdtemp()
         conf_d = os.path.join(dirname, "conf.d")
         os.mkdir(conf_d)
@@ -956,6 +956,19 @@ class ServerOptionsTests(unittest.TestCase):
         finally:
             shutil.rmtree(dirname, ignore_errors=True)
 
+    def test_read_config_include_expands_here(self):
+        conf = os.path.join(
+            os.path.abspath(os.path.dirname(__file__)), 'fixtures',
+            'include.conf')
+        root_here = os.path.dirname(conf)
+        include_here = os.path.join(root_here, 'example')
+        parser = self._makeOne()
+        parser.configfile = conf
+        parser.process_config_file(True)
+        section = parser.configroot.supervisord
+        self.assertEqual(section.logfile, root_here)
+        self.assertEqual(section.childlogdir, include_here)
+
     def test_readFile_failed(self):
         from supervisor.options import readFile
         try:
@@ -2800,19 +2813,6 @@ class ServerOptionsTests(unittest.TestCase):
         instance.poller.before_daemonize.assert_called_once_with()
         instance.poller.after_daemonize.assert_called_once_with()
 
-    def test_include_here(self):
-        conf = os.path.join(
-            os.path.abspath(os.path.dirname(__file__)), 'fixtures',
-            'include.conf')
-        root_here = os.path.dirname(conf)
-        include_here = os.path.join(root_here, 'example')
-        parser = self._makeOne()
-        parser.configfile = conf
-        parser.process_config_file(True)
-        section = parser.configroot.supervisord
-        self.assertEqual(section.logfile, root_here)
-        self.assertEqual(section.childlogdir, include_here)
-
 class TestProcessConfig(unittest.TestCase):
     def _getTargetClass(self):
         from supervisor.options import ProcessConfig