Changeset View
Changeset View
Standalone View
Standalone View
sysutils/py-supervisor/files/patch-supervisor_tests_test__options.py
- This file was moved from sysutils/py-supervisor/files/patch-supervisor-tests-test_options.py.
--- supervisor/tests/test_options.py.orig 2016-05-14 21:19:49.000000000 +0300 | --- supervisor/tests/test_options.py.orig 2018-02-15 21:31:47 UTC | ||||
+++ supervisor/tests/test_options.py 2016-06-08 17:05:08.114929000 +0300 | +++ supervisor/tests/test_options.py | ||||
@@ -157,15 +157,15 @@ class OptionTests(unittest.TestCase): | @@ -160,12 +160,9 @@ class OptionTests(unittest.TestCase): | ||||
short=False, | |||||
) | |||||
- def test_searchpaths(self): | def test_searchpaths(self): | ||||
- options = self._makeOptions() | options = self._makeOptions() | ||||
- self.assertEqual(len(options.searchpaths), 6) | - self.assertEqual(len(options.searchpaths), 6) | ||||
- self.assertEqual(options.searchpaths[-4:], [ | - self.assertEqual(options.searchpaths[-4:], [ | ||||
- 'supervisord.conf', | - 'supervisord.conf', | ||||
- 'etc/supervisord.conf', | - 'etc/supervisord.conf', | ||||
- '/etc/supervisord.conf', | - '/etc/supervisord.conf', | ||||
- '/etc/supervisor/supervisord.conf', | - '/etc/supervisor/supervisord.conf', | ||||
- ]) | + self.assertEqual(len(options.searchpaths), 1) | ||||
+# def test_searchpaths(self): | + self.assertEqual(options.searchpaths[-1:], [ | ||||
+# options = self._makeOptions() | + '%%PREFIX%%/etc/supervisord.conf', | ||||
+# self.assertEqual(len(options.searchpaths), 6) | ]) | ||||
+# self.assertEqual(options.searchpaths[-4:], [ | |||||
+# 'supervisord.conf', | |||||
+# 'etc/supervisord.conf', | |||||
+# '/etc/supervisord.conf', | |||||
+# '/etc/supervisor/supervisord.conf', | |||||
+# ]) | |||||
def test_options_and_args_order(self): | def test_options_and_args_order(self): | ||||
# Only config file exists | |||||
@@ -352,17 +352,17 @@ class ClientOptionsTests(unittest.TestCa | |||||
except ValueError, exc: | |||||
self.assertTrue("could not find config file" in exc.args[0]) | |||||
- def test_read_config_unreadable(self): | |||||
- instance = self._makeOne() | |||||
- def dummy_open(fn, mode): | |||||
- raise IOError(errno.EACCES, 'Permission denied: %s' % fn) | |||||
- instance.open = dummy_open | |||||
- | |||||
- try: | |||||
- instance.read_config(__file__) | |||||
- self.fail("expected exception") | |||||
- except ValueError, exc: | |||||
- self.assertTrue("could not read config file" in exc.args[0]) | |||||
+# def test_read_config_unreadable(self): | |||||
+# instance = self._makeOne() | |||||
+# def dummy_open(fn, mode): | |||||
+# raise IOError(errno.EACCES, 'Permission denied: %s' % fn) | |||||
+# instance.open = dummy_open | |||||
+ | |||||
+# try: | |||||
+# instance.read_config(__file__) | |||||
+# self.fail("expected exception") | |||||
+# except ValueError, exc: | |||||
+# self.assertTrue("could not read config file" in exc.args[0]) | |||||
def test_read_config_no_supervisord_section_raises_valueerror(self): | |||||
instance = self._makeOne() | |||||
@@ -803,17 +803,17 @@ class ServerOptionsTests(unittest.TestCa | |||||
except ValueError, exc: | |||||
self.assertTrue("could not find config file" in exc.args[0]) | |||||
- def test_read_config_unreadable(self): | |||||
- instance = self._makeOne() | |||||
- def dummy_open(fn, mode): | |||||
- raise IOError(errno.EACCES, 'Permission denied: %s' % fn) | |||||
- instance.open = dummy_open | |||||
- | |||||
- try: | |||||
- instance.read_config(__file__) | |||||
- self.fail("nothing raised") | |||||
- except ValueError, exc: | |||||
- self.assertTrue("could not read config file" in exc.args[0]) | |||||
+# def test_read_config_unreadable(self): | |||||
+# instance = self._makeOne() | |||||
+# def dummy_open(fn, mode): | |||||
+# raise IOError(errno.EACCES, 'Permission denied: %s' % fn) | |||||
+# instance.open = dummy_open | |||||
+ | |||||
+# try: | |||||
+# instance.read_config(__file__) | |||||
+# self.fail("nothing raised") | |||||
+# except ValueError, exc: | |||||
+# self.assertTrue("could not read config file" in exc.args[0]) | |||||
def test_read_config_malformed_config_file_raises_valueerror(self): | |||||
instance = self._makeOne() |