コード例 #1
0
 def test_languages(self):
     r"""Test different combinations of source/destination languages."""
     kwargs = copy.deepcopy(self.inst_kwargs)
     for l1 in timing._lang_list:
         args = (l1, l1)
         x = timing.TimedRun(*args, **kwargs)
         x.time_run(*self.time_run_args, **self.time_run_kwargs)
コード例 #2
0
def test_platform_error():
    r"""Test error when test cannot be performed."""
    test_platform_map = {'MacOS': 'Linux',
                         'Linux': 'Windows',
                         'Windows': 'MacOS'}
    test_platform = test_platform_map[platform._platform]
    x = timing.TimedRun(_test_lang, _test_lang, platform=test_platform)
    assert_raises(RuntimeError, x.can_run, raise_error=True)
コード例 #3
0
def test_platform_error():
    r"""Test error when test cannot be performed."""
    if platform._is_mac:
        test_platform = 'Linux'
    else:
        test_platform = 'MacOS'
    x = timing.TimedRun(_test_lang, _test_lang, platform=test_platform)
    assert_raises(RuntimeError, x.can_run, raise_error=True)
コード例 #4
0
 def test_comm_types(self):
     r"""Test different comm types."""
     args = copy.deepcopy(self.inst_args)
     kwargs = copy.deepcopy(self.inst_kwargs)
     for c in timing._comm_list:
         kwargs['comm_type'] = c
         x = timing.TimedRun(*args, **kwargs)
         x.time_run(*self.time_run_args, **self.time_run_kwargs)