本文整理汇总了Python中mypdb.set_trace函数的典型用法代码示例。如果您正苦于以下问题:Python set_trace函数的具体用法?Python set_trace怎么用?Python set_trace使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了set_trace函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: test_parser
def test_parser(self):
if self.run_in_debugger:
pdb.set_trace()
document = utils.new_document('test data', self.settings)
self.parser.parse(self.input, document)
output = document.pformat()
self.compare_output(self.input, output, self.expected)
开发者ID:Distrotech,项目名称:docutils,代码行数:7,代码来源:DocutilsTestSupport.py
示例2: test_publish
def test_publish(self):
if self.run_in_debugger:
pdb.set_trace()
output = docutils.core.publish_string(
source=self.input,
reader_name='standalone',
parser_name='restructuredtext',
writer_name='python_latex',
settings_spec=self)
self.compare_output(self.input, output, self.expected)
开发者ID:Distrotech,项目名称:docutils,代码行数:10,代码来源:DocutilsTestSupport.py
示例3: test_token_parser_rhs
def test_token_parser_rhs(self):
if self.run_in_debugger:
pdb.set_trace()
try:
import compiler
except ImportError:
# skip on Python 3
return
from docutils.readers.python import moduleparser
tr = moduleparser.TokenParser(self.input)
output = tr.rhs(1)
self.compare_output(self.input, output, self.expected)
开发者ID:conrado,项目名称:democracygame,代码行数:12,代码来源:DocutilsTestSupport.py
示例4: test_parser
def test_parser(self):
if self.run_in_debugger:
pdb.set_trace()
try:
import compiler
except ImportError:
# skip on Python 3
return
from docutils.readers.python import moduleparser
module = moduleparser.parse_module(self.input, 'test data').pformat()
output = str(module)
self.compare_output(self.input, output, self.expected)
开发者ID:conrado,项目名称:democracygame,代码行数:12,代码来源:DocutilsTestSupport.py
示例5: test_transforms
def test_transforms(self):
if self.run_in_debugger:
pdb.set_trace()
document = utils.new_document('test data', self.settings)
self.parser.parse(self.input, document)
# Don't do a ``populate_from_components()`` because that would
# enable the Transformer's default transforms.
document.transformer.add_transforms(self.transforms)
document.transformer.add_transform(universal.TestMessages)
document.transformer.components['writer'] = self
document.transformer.apply_transforms()
output = document.pformat()
self.compare_output(self.input, output, self.expected)
开发者ID:Distrotech,项目名称:docutils,代码行数:13,代码来源:DocutilsTestSupport.py
示例6: test_publish
def test_publish(self):
if self.run_in_debugger:
pdb.set_trace()
parts = docutils.core.publish_parts(
source=self.input,
reader_name='standalone',
parser_name='restructuredtext',
writer_name=self.writer_name,
settings_spec=self,
settings_overrides=self.suite_settings)
output = self.format_output(parts)
# interpolate standard variables:
expected = self.expected % {'version': docutils.__version__}
self.compare_output(self.input, output, expected)
开发者ID:alon,项目名称:polinax,代码行数:14,代码来源:DocutilsTestSupport.py
示例7: test_transforms_verbosely
def test_transforms_verbosely(self):
if self.run_in_debugger:
pdb.set_trace()
print '\n', self.id
print '-' * 70
print self.input
document = utils.new_document('test data', self.settings)
self.parser.parse(self.input, document)
print '-' * 70
print document.pformat()
for transformClass in self.transforms:
transformClass(document).apply()
output = document.pformat()
print '-' * 70
print output
self.compare_output(self.input, output, self.expected)
开发者ID:Distrotech,项目名称:docutils,代码行数:16,代码来源:DocutilsTestSupport.py
示例8: test_transforms_verbosely
def test_transforms_verbosely(self):
if self.run_in_debugger:
pdb.set_trace()
print('\n', self.id)
print('-' * 70)
print(self.input)
settings = self.settings.copy()
settings.__dict__.update(self.suite_settings)
document = utils.new_document('test data', settings)
self.parser.parse(self.input, document)
print('-' * 70)
print(document.pformat())
for transformClass in self.transforms:
transformClass(document).apply()
output = document.pformat()
print('-' * 70)
print(output)
self.compare_output(self.input, output, self.expected)
开发者ID:igemsoftware,项目名称:Michigan15,代码行数:18,代码来源:DocutilsTestSupport.py
示例9: test_token_parser_rhs
def test_token_parser_rhs(self):
if self.run_in_debugger:
pdb.set_trace()
tr = moduleparser.TokenParser(self.input)
output = tr.rhs(1)
self.compare_output(self.input, output, self.expected)
开发者ID:Distrotech,项目名称:docutils,代码行数:6,代码来源:DocutilsTestSupport.py
注:本文中的mypdb.set_trace函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论