Skip to content
3 changes: 2 additions & 1 deletion tests/basics/string_tstring_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,8 @@
print("\n=== Interpolation attribute tests ===")
i_basic = Interpolation(42, "x")
print(f"Basic conversion: {i_basic.conversion}")
print(f"Basic format_spec: {i_basic.format_spec}")
# Put in quotes to make empty string visible.
print(f"Basic format_spec: '{i_basic.format_spec}'")

i_with_conv = Interpolation(42, "x", "s")
print(f"With conversion: {i_with_conv.conversion}")
Expand Down
2 changes: 1 addition & 1 deletion tests/basics/string_tstring_basic.py.exp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Nested expr: Template(strings=('', ''), interpolations=(Interpolation('{}', 'inn

=== Interpolation attribute tests ===
Basic conversion: None
Basic format_spec:
Basic format_spec: ''
With conversion: s
With format_spec: :>10
Full conversion: r
Expand Down
4 changes: 2 additions & 2 deletions tests/cmdline/cmd_showbc.py.exp
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ arg names:
58 UNARY_OP 1 __neg__
59 STORE_FAST 9
60 LOAD_FAST 0
61 UNARY_OP 3
61 UNARY_OP 3 \$
Comment thread
dhalbert marked this conversation as resolved.
62 STORE_FAST 10
63 LOAD_FAST 0
64 LOAD_DEREF 14
Expand All @@ -206,7 +206,7 @@ arg names:
84 LOAD_DEREF 14
86 LOAD_FAST 1
87 BINARY_OP 2 __eq__
88 UNARY_OP 3
88 UNARY_OP 3 \$
89 STORE_FAST 10
90 LOAD_DEREF 14
92 LOAD_ATTR c
Expand Down
2 changes: 1 addition & 1 deletion tests/cmdline/cmd_showbc_const.py.exp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ arg names:
34 RAISE_OBJ
35 DUP_TOP
36 LOAD_NAME AttributeError
38 BINARY_OP 8
38 BINARY_OP 8 \$
39 POP_JUMP_IF_FALSE 44
41 POP_TOP
42 POP_EXCEPT_JUMP 45
Expand Down
2 changes: 1 addition & 1 deletion tests/cmdline/repl_autocomplete.py.exp
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ Type "help()" for more information.
>>> i.lower('ABC')
'abc'
>>> None.
>>>
>>> \$
11 changes: 5 additions & 6 deletions tests/cmdline/repl_autocomplete_underscore.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,20 @@ def __init__(self):
self.public_attr = 1
self._private_attr = 2
self.__very_private = 3

def public_method(self):
pass

def _private_method(self):
pass

@property
def public_property(self):
return 42
@property

@property
def _private_property(self):
return 99

{\x04}
# Paste executed

Expand Down
25 changes: 12 additions & 13 deletions tests/cmdline/repl_autocomplete_underscore.py.exp
Original file line number Diff line number Diff line change
@@ -1,41 +1,40 @@
MicroPython \.\+ version
Type "help()" for more information.
>>> # Test REPL autocompletion filtering of underscore attributes
>>>
>>> \$
>>> # Start paste mode
>>>
>>> \$
paste mode; Ctrl-C to cancel, Ctrl-D to finish
===
=== \$
=== class TestClass:
=== def __init__(self):
=== self.public_attr = 1
=== self._private_attr = 2
=== self.__very_private = 3
===
=== \$
=== def public_method(self):
=== pass
===
=== \$
=== def _private_method(self):
=== pass
===
=== \$
=== @property
=== def public_property(self):
=== return 42
===
=== @property
=== \$
=== @property
=== def _private_property(self):
=== return 99
===
===
=== \$
>>> # Paste executed
>>>
>>> \$
>>> # Create an instance
>>> obj = TestClass()
>>>
>>> \$
>>> # Test tab completion on the instance
>>> # The tab character after `obj.` and 'a' below triggers the completions
>>> obj.public_
public_attr public_method public_property
>>> obj.public_attr
1
>>>
>>> \$
12 changes: 6 additions & 6 deletions tests/cmdline/repl_autoindent.py.exp
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@ Type "help()" for more information.
>>> # tests for autoindent
>>> if 1:
... print(1)
...
...
...
... \$
... \$
... \$
1
>>> if 0:
...  print(2)
... else:
... print(3)
...
... \$
3
>>> if 0:
... print(4)
... else:
... print(5)
...
... \$
5
>>>
>>> \$
2 changes: 1 addition & 1 deletion tests/cmdline/repl_basic.py.exp
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ Type "help()" for more information.
1
>>> 2
2
>>>
>>> \$
2 changes: 1 addition & 1 deletion tests/cmdline/repl_cont.py.exp
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ two
>>> if1 = 2
>>> print(if1)
2
>>>
>>> \$
2 changes: 1 addition & 1 deletion tests/cmdline/repl_emacs_keys.py.exp
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ Type "help()" for more information.
>>> t = 121
>>> \.\+
'foobar'
>>>
>>> \$
2 changes: 1 addition & 1 deletion tests/cmdline/repl_inspect.py.exp
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ MicroPython \.\+ version
Type "help()" for more information.
>>> # cmdline: -i -c print("test")
>>> # -c option combined with -i option results in REPL
>>>
>>> \$
2 changes: 1 addition & 1 deletion tests/cmdline/repl_micropyinspect.py.exp
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ MicroPython \.\+ version
Type "help()" for more information.
>>> # cmdline: cmdline/repl_micropyinspect
>>> # setting MICROPYINSPECT environment variable before program exit triggers REPL
>>>
>>> \$
12 changes: 6 additions & 6 deletions tests/cmdline/repl_paste.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ def calculate(n):
{\x05}
def function_with_blanks():
print('First line')
{\x20}{\x20}{\x20}{\x20}
print('After blank line')
{\x20}{\x20}{\x20}{\x20}
{\x20}{\x20}{\x20}{\x20}
print('After two blank lines')

function_with_blanks()
Expand All @@ -40,10 +40,10 @@ def function_with_blanks():
class TestClass:
def __init__(self, value):
self.value = value
{\x20}{\x20}{\x20}{\x20}
def display(self):
print(f'Value is: {self.value}')
{\x20}{\x20}{\x20}{\x20}
def double(self):
self.value *= 2
return self.value
Expand Down Expand Up @@ -82,7 +82,7 @@ def bad_syntax(:
{\x05}
def will_error():
undefined_variable
{\x20}{\x20}{\x20}{\x20}
will_error()
{\x04}

Expand Down
Loading
Loading