Skip to content

Commit 22b1f38

Browse files
committed
Remove trailing whitespace
(to make subsequent commits easier to read)
1 parent 671698d commit 22b1f38

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

tests/test_interpreter.py

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ def test_hallucinations():
3737
assert chunk.get("content") == "22"
3838
break
3939

40-
code = """{
41-
"language": "python",
42-
"code": "10+12"
40+
code = """{
41+
"language": "python",
42+
"code": "10+12"
4343
}"""
4444

4545
interpreter.messages = [
@@ -50,9 +50,9 @@ def test_hallucinations():
5050
assert chunk.get("content") == "22"
5151
break
5252

53-
code = """functions.execute({
54-
"language": "python",
55-
"code": "10+12"
53+
code = """functions.execute({
54+
"language": "python",
55+
"code": "10+12"
5656
})"""
5757

5858
interpreter.messages = [
@@ -1198,7 +1198,7 @@ def test_math():
11981198

11991199
order_of_operations_message = f"""
12001200
Please perform the calculation `{n1} + {n2} * ({n1} - {n2}) / ({n2} + {n1})` then reply with just the answer, nothing else. No confirmation. No explanation. No words. Do not use commas. Do not show your work. Just return the result of the calculation. Do not introduce the results with a phrase like \"The result of the calculation is...\" or \"The answer is...\"
1201-
1201+
12021202
Round to 2 decimal places.
12031203
""".strip()
12041204

@@ -1215,20 +1215,20 @@ def test_break_execution():
12151215
"""
12161216

12171217
code = r"""print("starting")
1218-
import time
1219-
import os
1220-
1218+
import time
1219+
import os
1220+
12211221
# Always create a fresh file
12221222
open('numbers.txt', 'w').close()
1223-
1224-
# Open the file in append mode
1225-
with open('numbers.txt', 'a+') as f:
1226-
# Loop through the numbers 1 to 5
1227-
for i in [1,2,3,4,5]:
1228-
# Print the number
1229-
print("adding", i, "to file")
1230-
# Append the number to the file
1231-
f.write(str(i) + '\n')
1223+
1224+
# Open the file in append mode
1225+
with open('numbers.txt', 'a+') as f:
1226+
# Loop through the numbers 1 to 5
1227+
for i in [1,2,3,4,5]:
1228+
# Print the number
1229+
print("adding", i, "to file")
1230+
# Append the number to the file
1231+
f.write(str(i) + '\n')
12321232
# Wait for 0.5 second
12331233
print("starting to sleep")
12341234
time.sleep(1)

0 commit comments

Comments
 (0)