本文整理汇总了Python中vis.workflow.WorkflowManager._shared_settings[u'n']方法的典型用法代码示例。如果您正苦于以下问题:Python WorkflowManager._shared_settings[u'n']方法的具体用法?Python WorkflowManager._shared_settings[u'n']怎么用?Python WorkflowManager._shared_settings[u'n']使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vis.workflow.WorkflowManager
的用法示例。
在下文中一共展示了WorkflowManager._shared_settings[u'n']方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_histogram_3
# 需要导入模块: from vis.workflow import WorkflowManager [as 别名]
# 或者: from vis.workflow.WorkflowManager import _shared_settings[u'n'] [as 别名]
def test_histogram_3(self, mock_call, mock_gdf, mock_join):
# test_ouput_6, plus top_x and threshold
test_wc = WorkflowManager([])
test_wc._previous_exp = u'n-grams'
test_wc._data = [1]
test_wc._shared_settings[u'n'] = 14
test_wc._result = MagicMock(spec=pandas.Series)
path = u'test_output/output_result'
actual = test_wc._make_histogram(top_x=420, threshold=1987)
mock_gdf.assert_called_once_with(u'freq', 420, 1987)
expected_args = [u'Rscript', u'--vanilla', mock_join.return_value,
path + u'.dta', path + u'.png', u'14', u'1']
mock_call.assert_called_once_with(expected_args)
self.assertEqual(path + u'.png', actual)
self.assertEqual(1, mock_join.call_count)
示例2: test_histogram_2
# 需要导入模块: from vis.workflow import WorkflowManager [as 别名]
# 或者: from vis.workflow.WorkflowManager import _shared_settings[u'n'] [as 别名]
def test_histogram_2(self, mock_call, mock_gdf, mock_join):
# with unspecified pathname; last experiment was 14-grams with 1 piece; self._result is S
test_wc = WorkflowManager([])
test_wc._previous_exp = u'n-grams'
test_wc._data = [1]
test_wc._shared_settings[u'n'] = 14
test_wc._result = MagicMock(spec=pandas.Series)
path = u'test_output/output_result'
actual = test_wc._make_histogram()
mock_gdf.assert_called_once_with(u'freq', None, None)
expected_args = [u'Rscript', u'--vanilla', mock_join.return_value,
path + u'.dta', path + u'.png', u'14', u'1']
mock_call.assert_called_once_with(expected_args)
self.assertEqual(path + u'.png', actual)
self.assertEqual(1, mock_join.call_count)
示例3: test_settings_7
# 需要导入模块: from vis.workflow import WorkflowManager [as 别名]
# 或者: from vis.workflow.WorkflowManager import _shared_settings[u'n'] [as 别名]
def test_settings_7(self, mock_ip):
# - we can properly fetch a "shared setting"
test_wm = WorkflowManager([u'a', u'b', u'c'])
self.assertEqual(3, mock_ip.call_count) # to make sure we're using the mock, not real IP
test_wm._shared_settings[u'n'] = 4000
self.assertEqual(4000, test_wm.settings(None, u'n'))