Quellcode durchsuchen

Making sure that a test never finds a config file.

The intention of the test is that it is not supposed to find a config
file anywhere on-disc. My local workstation does not have one, but
future testers might.
Jens Rantil vor 13 Jahren
Ursprung
Commit
43e35253ad
1 geänderte Dateien mit 5 neuen und 0 gelöschten Zeilen
  1. 5 0
      supervisor/tests/test_supervisorctl.py

+ 5 - 0
supervisor/tests/test_supervisorctl.py

@@ -162,6 +162,11 @@ class ControllerTests(unittest.TestCase):
         from supervisor.options import ClientOptions
         args = [] # simulating starting without parameters
         options = ClientOptions()
+
+        # No default config file search in case they would exist
+        self.assertTrue(len(options.searchpaths) > 0)
+        options.searchpaths = []
+
         options.realize(args, doc=__doc__)
         c = self._makeOne(options)