Home
last modified time | relevance | path

Searched +refs:doctest +refs:indent +refs:source +refs:line (Results 1 – 25 of 210) sorted by relevance

123456789

/dports/devel/ipython/ipython-7.29.0/IPython/testing/plugin/
H A Dipdoctest.py23 import doctest
327 def __init__(self, source, want, exc_msg=None, lineno=0, indent=0, argument
330 doctest.Example.__init__(self,source,want,exc_msg,lineno,indent,options)
333 self.source += '\n'
384 def ip2py(self,source): argument
511 source = '\n'.join([sl[indent+ps1_len+1:] for sl in source_lines])
515 source = self.ip2py(source)
554 space_idx = indent+ps1_len
556 for i, line in enumerate(lines):
557 if len(line) >= min_len and line[space_idx] != ' ':
[all …]
/dports/devel/ipython5/ipython-5.10.0/IPython/testing/plugin/
H A Dipdoctest.py22 import doctest
332 def __init__(self, source, want, exc_msg=None, lineno=0, indent=0, argument
335 doctest.Example.__init__(self,source,want,exc_msg,lineno,indent,options)
338 self.source += '\n'
389 def ip2py(self,source): argument
516 source = '\n'.join([sl[indent+ps1_len+1:] for sl in source_lines])
520 source = self.ip2py(source)
559 space_idx = indent+ps1_len
561 for i, line in enumerate(lines):
562 if len(line) >= min_len and line[space_idx] != ' ':
[all …]
/dports/www/py-paste/Paste-3.4.6/paste/debug/
H A Ddoctest_webapp.py12 import doctest
90 ls(dir=full, recurse=True, indent=indent+2)
142 for line in lines:
143 out.write(line + '\n')
178 for line in lines:
249 lines[line:line] = [text]
341 source = '\n'.join([sl[indent:] for sl in source_lines])
343 source = '\n'.join([sl[indent+4:] for sl in source_lines])
418 doctest.testmod()
426 doctest.testfile(
[all …]
/dports/www/chromium-legacy/chromium-88.0.4324.182/third_party/catapult/third_party/Paste/paste/debug/
H A Ddoctest_webapp.py12 import doctest
90 ls(dir=full, recurse=True, indent=indent+2)
142 for line in lines:
143 out.write(line + '\n')
178 for line in lines:
249 lines[line:line] = [text]
341 source = '\n'.join([sl[indent:] for sl in source_lines])
343 source = '\n'.join([sl[indent+4:] for sl in source_lines])
418 doctest.testmod()
426 doctest.testfile(
[all …]
/dports/lang/elixir-devel/elixir-1.13.1/lib/ex_unit/lib/ex_unit/
H A Ddoc_test.ex225 source =
226 module.module_info(:compile)[:source] ||
229 "(for doctest at) " <> Path.relative_to_cwd(source)
546 line_indent = get_indent(line, indent)
554 defp adjust_indent(kind, [line | rest], line_no, adjusted_lines, indent, module)
556 stripped_line = strip_indent(line, indent)
572 indentation level mismatch on doctest line: #{inspect(line)}
596 stripped_line = strip_indent(line, indent)
619 defp strip_indent(line, indent) do
620 length = byte_size(line) - indent
[all …]
/dports/lang/elixir/elixir-1.12.3/lib/ex_unit/lib/ex_unit/
H A Ddoc_test.ex225 source =
226 module.__info__(:compile)[:source] ||
229 "(for doctest at) " <> Path.relative_to_cwd(source)
546 line_indent = get_indent(line, indent)
554 defp adjust_indent(kind, [line | rest], line_no, adjusted_lines, indent, module)
556 stripped_line = strip_indent(line, indent)
572 indentation level mismatch on doctest line: #{inspect(line)}
596 stripped_line = strip_indent(line, indent)
619 defp strip_indent(line, indent) do
620 length = byte_size(line) - indent
[all …]
/dports/www/firefox-legacy/firefox-52.8.0esr/testing/web-platform/tests/tools/pytest/_pytest/
H A Ddoctest.py56 for line in self.lines:
57 tw.line(line)
105 indent = '>>>'
106 for line in example.source.splitlines():
107 lines.append('??? %s %s' % (indent, line))
108 indent = '...'
126 import doctest
176 import doctest
234 import doctest
281 import doctest
[all …]
/dports/www/firefox-legacy/firefox-52.8.0esr/python/pytest/_pytest/
H A Ddoctest.py56 for line in self.lines:
57 tw.line(line)
105 indent = '>>>'
106 for line in example.source.splitlines():
107 lines.append('??? %s %s' % (indent, line))
108 indent = '...'
126 import doctest
176 import doctest
234 import doctest
281 import doctest
[all …]
/dports/lang/spidermonkey60/firefox-60.9.0/third_party/python/pytest/_pytest/
H A Ddoctest.py75 for line in self.lines:
76 tw.line(line)
125 indent = '>>>'
126 for line in example.source.splitlines():
127 lines.append('??? %s %s' % (indent, line))
128 indent = '...'
146 import doctest
195 import doctest
254 import doctest
301 import doctest
[all …]
/dports/lang/spidermonkey60/firefox-60.9.0/testing/web-platform/tests/tools/third_party/pytest/_pytest/
H A Ddoctest.py83 for line in self.lines:
84 tw.line(line)
133 indent = '>>>'
134 for line in example.source.splitlines():
135 lines.append('??? %s %s' % (indent, line))
136 indent = '...'
154 import doctest
204 import doctest
263 import doctest
310 import doctest
[all …]
/dports/lang/python39/Python-3.9.9/Doc/library/
H A Dast.rst14 **Source code:** :source:`Lib/ast.py`
85 :attr:`end_lineno` are the first and last line numbers of the source
86 text span (1-indexed so the first line is line 1), and the
93 one can get the source segment of a one-line expression node using
678 >>> print(ast.dump(ast.parse('[ord(c) for line in file for c in line]', mode='eval'),
695 iter=Name(id='line', ctx=Load()),
1528 Parse the source into an AST node. Equivalent to ``compile(source,
1630 Get source code segment of the *source* that generated *node*.
1634 If *padded* is ``True``, the first line of a multi-line statement will
1651 Increment the line number and end line number of each node in the tree
[all …]
/dports/mail/thunderbird/thunderbird-91.8.0/third_party/python/pytest/_pytest/
H A Ddoctest.py115 for line in lines:
116 tw.line(line)
128 import doctest
251 indent = ">>>"
252 for line in example.source.splitlines():
253 lines.append("??? %s %s" % (indent, line))
254 indent = "..."
275 import doctest
342 import doctest
410 import doctest
[all …]
/dports/www/firefox-esr/firefox-91.8.0/third_party/python/pytest/_pytest/
H A Ddoctest.py115 for line in lines:
116 tw.line(line)
128 import doctest
251 indent = ">>>"
252 for line in example.source.splitlines():
253 lines.append("??? %s %s" % (indent, line))
254 indent = "..."
275 import doctest
342 import doctest
410 import doctest
[all …]
/dports/lang/spidermonkey78/firefox-78.9.0/testing/web-platform/tests/tools/third_party/pytest/src/_pytest/
H A Ddoctest.py115 for line in lines:
116 tw.line(line)
128 import doctest
251 indent = ">>>"
252 for line in example.source.splitlines():
253 lines.append("??? %s %s" % (indent, line))
254 indent = "..."
275 import doctest
342 import doctest
410 import doctest
[all …]
/dports/lang/spidermonkey78/firefox-78.9.0/third_party/python/pytest/src/_pytest/
H A Ddoctest.py115 for line in lines:
116 tw.line(line)
128 import doctest
251 indent = ">>>"
252 for line in example.source.splitlines():
253 lines.append("??? %s %s" % (indent, line))
254 indent = "..."
275 import doctest
342 import doctest
410 import doctest
[all …]
/dports/lang/python310/Python-3.10.1/Doc/library/
H A Dast.rst14 **Source code:** :source:`Lib/ast.py`
85 are the first and last line numbers of source text span (1-indexed so the
86 first line is line 1) and the :attr:`col_offset` and :attr:`end_col_offset`
93 one can get the source segment of a one-line expression node using
678 >>> print(ast.dump(ast.parse('[ord(c) for line in file for c in line]', mode='eval'),
695 iter=Name(id='line', ctx=Load()),
1896 Parse the source into an AST node. Equivalent to ``compile(source,
2005 Get source code segment of the *source* that generated *node*.
2009 If *padded* is ``True``, the first line of a multi-line statement will
2026 Increment the line number and end line number of each node in the tree
[all …]
/dports/lang/python311/Python-3.11.0a3/Doc/library/
H A Dast.rst14 **Source code:** :source:`Lib/ast.py`
85 are the first and last line numbers of source text span (1-indexed so the
86 first line is line 1) and the :attr:`col_offset` and :attr:`end_col_offset`
93 one can get the source segment of a one-line expression node using
678 >>> print(ast.dump(ast.parse('[ord(c) for line in file for c in line]', mode='eval'),
695 iter=Name(id='line', ctx=Load()),
1896 Parse the source into an AST node. Equivalent to ``compile(source,
2005 Get source code segment of the *source* that generated *node*.
2009 If *padded* is ``True``, the first line of a multi-line statement will
2026 Increment the line number and end line number of each node in the tree
[all …]
/dports/devel/py-pytest/pytest-4.6.11/src/_pytest/
H A Ddoctest.py124 for line in lines:
125 tw.line(line)
136 import doctest
261 indent = ">>>"
262 for line in example.source.splitlines():
263 lines.append("??? %s %s" % (indent, line))
264 indent = "..."
283 import doctest
350 import doctest
476 import doctest
[all …]
/dports/www/chromium-legacy/chromium-88.0.4324.182/third_party/depot_tools/third_party/schema/
H A Dtox.ini15 commands = py.test --doctest-glob=README.rst # test documentation
19 …abled for E701 (multiple statements on one line) and E126 (continuation line over-indented for han…
20 commands = flake8 --max-line-length=90 --show-source -v --count --ignore=E701,E126
26 py.test --doctest-glob=README.rst --cov schema
/dports/www/chromium-legacy/chromium-88.0.4324.182/third_party/catapult/third_party/depot_tools/depot_tools/third_party/schema/
H A Dtox.ini15 commands = py.test --doctest-glob=README.rst # test documentation
19 …abled for E701 (multiple statements on one line) and E126 (continuation line over-indented for han…
20 commands = flake8 --max-line-length=90 --show-source -v --count --ignore=E701,E126
26 py.test --doctest-glob=README.rst --cov schema
/dports/www/firefox-esr/firefox-91.8.0/testing/web-platform/tests/tools/third_party/pytest/src/_pytest/
H A Ddoctest.py42 import doctest
160 for line in lines:
161 tw.line(line)
172 import doctest
350 indent = ">>>"
351 for line in example.source.splitlines():
352 lines.append("??? {} {}".format(indent, line))
353 indent = "..."
376 import doctest
444 import doctest
[all …]
/dports/www/firefox/firefox-99.0/testing/web-platform/tests/tools/third_party/pytest/src/_pytest/
H A Ddoctest.py42 import doctest
160 for line in lines:
161 tw.line(line)
172 import doctest
350 indent = ">>>"
351 for line in example.source.splitlines():
352 lines.append("??? {} {}".format(indent, line))
353 indent = "..."
376 import doctest
444 import doctest
[all …]
/dports/mail/thunderbird/thunderbird-91.8.0/testing/web-platform/tests/tools/third_party/pytest/src/_pytest/
H A Ddoctest.py42 import doctest
160 for line in lines:
161 tw.line(line)
172 import doctest
350 indent = ">>>"
351 for line in example.source.splitlines():
352 lines.append("??? {} {}".format(indent, line))
353 indent = "..."
376 import doctest
444 import doctest
[all …]
/dports/math/octave-forge-doctest/doctest-0.7.0/inst/private/
H A Ddoctest_collect.m62 % covers "doctest @class", but not "doctest @class/method"
72 % covers "doctest class.method" and "doctest class/method"
87 % cheap hack to not indent when calling "doctest ."
193 % run doctest
225 fprintf(fid, ' >> %s\n\n', results(j).source);
427 '(doctest:\s*.*)' ]; % want the doctest token
438 % Normalize end of line characters again. __makeinfo__ returns end of line
511 % every line is preceded by “=>”.
512 indent = regexp(L, '\S', 'once'); variable
513 indent(cellfun ('isempty', indent)) = inf;
[all …]
/dports/textproc/py-xmlschema/xmlschema-1.8.2/doc/
H A Dusage.rst35 .. doctest::
42 .. doctest::
47 .. doctest::
56 because the package cannot knows anything about the schema's source location:
158 File "<stdin>", line 1, in <module>
389 >>> pprint(xs.to_dict(xml_document, dict_class=dict), indent=4)
426 >>> print(json.dumps(xmlschema.to_dict(xml_document), indent=4))
428 File "/usr/lib64/python2.7/doctest.py", line 1315, in __run
430 File "<doctest default[3]>", line 1, in <module>
431 print(json.dumps(xmlschema.to_dict(xml_document), indent=4))
[all …]

123456789