File tree 2 files changed +20
-4
lines changed 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> {
171
171
return Ok ( Joined {
172
172
values : vec ! [
173
173
Constant {
174
- value: pred_expression_text. to_owned ( ) + "=" ,
174
+ value: pred_expression_text + "=" ,
175
175
} ,
176
176
Constant {
177
- value: trailing_seq. to_owned ( ) ,
177
+ value: trailing_seq,
178
178
} ,
179
179
FormattedValue {
180
180
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
2
18
foo = 'bar'
3
19
4
20
assert f"{ '' } " == ''
25
41
26
42
f'{ num = } ' # keep this line as it will fail when using a python 3.7 interpreter
27
43
28
- assert f'{ num = } ' == 'num=42' ,
44
+ assert f'{ num = } ' == 'num=42'
29
45
assert f'{ num = :>10} ' == 'num= 42'
30
46
31
47
You can’t perform that action at this time.
0 commit comments