File tree Expand file tree Collapse file tree 2 files changed +20
-4
lines changed
Expand file tree Collapse file tree 2 files changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -171,10 +171,10 @@ impl<'a> FStringParser<'a> {
171171 return Ok ( Joined {
172172 values : vec ! [
173173 Constant {
174- value: pred_expression_text. to_owned ( ) + "=" ,
174+ value: pred_expression_text + "=" ,
175175 } ,
176176 Constant {
177- value: trailing_seq. to_owned ( ) ,
177+ value: trailing_seq,
178178 } ,
179179 FormattedValue {
180180 value: Box :: new(
Original file line number Diff line number Diff line change 1- #from testutils import assert_raises
1+ from testutils import assert_raises
2+
3+ #test only makes sense with python 3.8 or higher (or RustPython)
4+ import sys
5+ import platform
6+ if platform .python_implementation () == 'CPython' :
7+ assert sys .version_info .major == 3 , 'Incompatible Python Version, expected CPython 3.8 or later'
8+ assert sys .version_info .minor == 8 , 'Incompatible Python Version, expected CPython 3.8 or later'
9+ elif platform .python_implementation == 'RustPython' :
10+ # ok
11+ pass
12+ else :
13+ # other implementation - lets give it a try
14+ pass
15+
16+
17+ # lets start tersing
218foo = 'bar'
319
420assert f"{ '' } " == ''
2541
2642f'{ num = } ' # keep this line as it will fail when using a python 3.7 interpreter
2743
28- assert f'{ num = } ' == 'num=42' ,
44+ assert f'{ num = } ' == 'num=42'
2945assert f'{ num = :>10} ' == 'num= 42'
3046
3147
You can’t perform that action at this time.
0 commit comments