def test_vector_pretty_print():
# TODO : The unit vectors should print with subscripts but they just
# print as `n_x` instead of making `x` a subscritp with unicode.
# TODO : The pretty print division does not print correctly here:
# w = alpha * N.x + sin(omega) * N.y + alpha / beta * N.z
pp = VectorPrettyPrinter()
expected = u(' 2\na n_x + b n_y + c\u22c5sin(\u03b1) n_z')
assert expected == pp.doprint(v)
assert expected == v._pretty().render()
expected = u('\u03b1 n_x + sin(\u03c9) n_y + \u03b1\u22c5\u03b2 n_z')
assert expected == pp.doprint(w)
assert expected == w._pretty().render()
评论列表
文章目录