Skip to content
This repository has been archived by the owner on Feb 22, 2020. It is now read-only.

Commit

Permalink
feat(cli): add py_path in parser to load external modules
Browse files Browse the repository at this point in the history
  • Loading branch information
hanhxiao committed Aug 20, 2019
1 parent 2557900 commit a57892f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/test_service_mgr.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class TestServiceManager(unittest.TestCase):
def setUp(self):
self.all_bytes = [b'abc', b'def', b'cde'] * 10
self.all_bytes2 = [b'abc', b'def', b'cde']
self.dir_path = os.path.dirname(__file__)
os.unsetenv('http_proxy')
os.unsetenv('https_proxy')

Expand Down Expand Up @@ -75,8 +76,8 @@ def _test_grpc_multiple_pub(self, backend='thread', num_parallel=5):

def test_external_module(self):
args = set_encoder_parser().parse_args([
'--yaml_path', 'contrib/dummy.yml',
'--py_path', 'contrib/dummy_contrib.py',
'--yaml_path', os.path.join(self.dir_path, 'contrib', 'dummy.yml'),
'--py_path', os.path.join(self.dir_path, 'contrib', 'dummy_contrib.py'),
])

with ServiceManager(RouterService, args):
Expand Down

0 comments on commit a57892f

Please sign in to comment.