Skip to content

Commit 82b5f21

Browse files
committed
Updated tests
1 parent 3bccd40 commit 82b5f21

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

sympy/physics/units/definitions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
# Dimensionless:
1818

19-
percent = percents = Quantity("percent", latex_repr="\%")
19+
percent = percents = Quantity("percent", latex_repr=r"\%")
2020
percent.set_dimension(One)
2121
percent.set_scale_factor(Rational(1, 100))
2222

sympy/printing/tests/test_latex.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
from sympy.logic import Implies
3737
from sympy.logic.boolalg import And, Or, Xor
3838
from sympy.physics.quantum import Commutator, Operator
39-
from sympy.physics.units import degree, radian, kg, meter, gibibyte
39+
from sympy.physics.units import degree, radian, kg, meter, gibibyte, microgram, second
4040
from sympy.core.trace import Tr
4141
from sympy.core.compatibility import range
4242
from sympy.combinatorics.permutations import Cycle, Permutation
@@ -2178,5 +2178,6 @@ def test_DiffGeomMethods():
21782178

21792179

21802180
def test_unit_ptinting():
2181-
assert latex(5*meter) == '5 \\text{ m}'
2182-
assert latex(3*gibibyte) == '3 \\text{ gibibyte}'
2181+
assert latex(5*meter) == r'5 \text{m}'
2182+
assert latex(3*gibibyte) == r'3 \text{gibibyte}'
2183+
assert latex(4*microgram/second) == r'\frac{4 \mu\text{g}}{\text{s}}'

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy