Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # coding=utf-8
- # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
- # Licensed under the Apache License, Version 2.0 (see LICENSE).
- from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
- unicode_literals, with_statement)
- from pants.backend.core.tasks.task import Task
- from pants.pantsd.subsystems.pants_daemon_launcher import PantsDaemonLauncher
- from pants_test.base_test import BaseTest
- class DummyTask(Task):
- """A placeholder task used as a hint to BaseTest to initialize the subsystem."""
- @classmethod
- def options_scope(cls):
- return 'dummy-pants-daemon-launcher-task'
- @classmethod
- def global_subsystems(cls):
- return Task.global_subsystems() + (PantsDaemonLauncher,)
- class TestPantsDaemonLauncher(BaseTest):
- @classmethod
- def task_type(cls):
- return DummyTask
- def setUp(self):
- BaseTest.setUp(self)
- self.context()
- def test_options_defaults(self):
- pdl = PantsDaemonLauncher.global_instance()
- self.assertIsFalse(pdl.options.enabled)
- self.assertEquals(pdl.options.http_host, '127.0.0.1')
- self.assertIsNone(pdl.options.http_port)
- self.assertIsNone(pdl.options.log_dir)
- self.assertIsNone(pdl.options.log_level)
Advertisement
Add Comment
Please, Sign In to add comment