Skip to content

Commit ab15414

Browse files
committed
Do unicode fstrings work on Windows?
1 parent a79729c commit ab15414

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

mathics/builtin/drawing/plot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2196,13 +2196,13 @@ def eval_f(self, f, x_value):
21962196

21972197

21982198
class PolarPlot(_Plot):
2199-
"""
2199+
u"""
22002200
<dl>
22012201
<dt>'PolarPlot[$r$, {$\u03B8$, $\u03B8_min$, $\u03B8_max$}]'
22022202
<dd>creates a polar plot of curve with radious $r$ as a function of angle $\u03B8$ ranging from $\u03B8_min$ to $\u03B8_max$.
22032203
</dl>
22042204
2205-
>> PolarPlot[Cos[5\[Theta]], {\[Theta], 0, Pi}]
2205+
>> PolarPlot[Cos[5\\[Theta]], {\\[Theta], 0, Pi}]
22062206
= -Graphics-
22072207
22082208
>> PolarPlot[{1, 1 + Sin[20 \u03B8] / 5}, {\u03B8, 0, 2 Pi}]

mathics/docpipeline.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,15 +85,17 @@ def test_case(test, tests, index=0, subindex=0, quiet=False, section=None):
8585
def fail(why):
8686
part, chapter, section = tests.part, tests.chapter, tests.section
8787
print_and_log(
88-
"%sTest failed: %s in %s / %s\n%s\n%s\n"
89-
% (sep, section, part, chapter, test, why)
88+
f"""{sep}Test failed: {section} in {part} / {chapter}
89+
{part}
90+
n{why}
91+
"""
9092
)
9193
return False
9294

9395
if not quiet:
9496
if section:
95-
print("%s %s / %s %s" % (stars, tests.chapter, section, stars))
96-
print("%4d (%2d): TEST %s" % (index, subindex, test))
97+
print(f"{stars} {tests.chapter} / {section} {stars}")
98+
print(f"{index:4d} ({subindex:2d}): TEST {test}")
9799

98100
feeder = MathicsSingleLineFeeder(test, "<test>")
99101
evaluation = Evaluation(definitions, catch_interrupt=False, output=TestOutput())

0 commit comments

Comments
 (0)