sympy / sympy

A computer algebra system written in pure Python
https://sympy.org/
Other
13.05k stars 4.47k forks source link

Testing SymPy on pyodide #23529

Closed asmeurer closed 2 years ago

asmeurer commented 2 years ago

Now that SymPy Live is moving to jupyterlite, we should make sure the SymPy tests pass on pyodide.

The version of SymPy on SymPy Live has the tests stripped. I also found that you have to do some workarounds to get the tests to work in jupytelite.

So far I have this

# Install sympy 1.10.1 from PyPI. The version that comes with pyodide has the tests stripped.
import micropip
micropip.install('https://files.pythonhosted.org/packages/d0/04/66be21ceb305c66a4b326b0ae44cc4f027a43bc08cac204b48fb45bb3653/sympy-1.10.1-py3-none-any.whl', 'mpmath')

# Work around a bug with pyodide
import sys
sys.stdout.encoding = 'utf-8'

import sympy
# subprocess=False is needed because subprocess doesn't work in pyodide
sympy.test(subprocess=False)

I ran this in a notebook at https://jupyterlite.readthedocs.io/en/latest/_static/lab/index.html and it got this far before hanging

============================= test process starts ==============================
executable:           (3.10.2-final-0) [CPython]
architecture:       32-bit
cache:              yes
ground types:       python 
numpy:              1.22.3
random seed:        40905969
hash randomization: off

sympy/algebras/tests/test_quaternion.py[10] ..........                      [OK]
sympy/assumptions/tests/test_assumptions_2.py[3] ...                        [OK]
sympy/assumptions/tests/test_context.py[4] ....                             [OK]
sympy/assumptions/tests/test_matrices.py[21] ...f..........f......          [OK]
sympy/assumptions/tests/test_query.py[71] ..................f...f..........f....
.................w.......f.......                                           [OK]
sympy/assumptions/tests/test_refine.py[15] ...............                  [OK]
sympy/assumptions/tests/test_satask.py[19] ....f..............              [OK]
sympy/assumptions/tests/test_sathandlers.py[4] ....                         [OK]
sympy/assumptions/tests/test_wrapper.py[3] ...                              [OK]
sympy/calculus/tests/test_accumulationbounds.py[12] .....f......            [OK]
sympy/calculus/tests/test_euler.py[6] ......                                [OK]
sympy/calculus/tests/test_finite_diff.py[4] ....                            [OK]
sympy/calculus/tests/test_singularities.py[6] ......                        [OK]
sympy/calculus/tests/test_util.py[13] .............                         [OK]
sympy/categories/tests/test_baseclasses.py[3] ...                           [OK]
sympy/categories/tests/test_drawing.py[9] .........                         [OK]
sympy/codegen/tests/test_algorithms.py[5] .ss.s                             [OK]
sympy/codegen/tests/test_applications.py[1] s                               [OK]
sympy/codegen/tests/test_approximations.py[3] ...                           [OK]
sympy/codegen/tests/test_ast.py[31] ...............................         [OK]
sympy/codegen/tests/test_cfunctions.py[9] .........                         [OK]
sympy/codegen/tests/test_cnodes.py[10] ..........                           [OK]
sympy/codegen/tests/test_cxxnodes.py[1] .                                   [OK]
sympy/codegen/tests/test_fnodes.py[12] .sfssf.....s                         [OK]
sympy/codegen/tests/test_numpy_nodes.py[2] ..                               [OK]
sympy/codegen/tests/test_pynodes.py[1] .                                    [OK]
sympy/codegen/tests/test_pyutils.py[1] .                                    [OK]
sympy/codegen/tests/test_rewriting.py[17] ...............fs                 [OK]
sympy/codegen/tests/test_scipy_nodes.py[1] .                                [OK]
sympy/combinatorics/tests/test_coset_table.py[4] .w..                       [OK]
sympy/combinatorics/tests/test_fp_groups.py[8] ..w.....                     [OK]
sympy/combinatorics/tests/test_free_groups.py[21] .....................     [OK]
sympy/combinatorics/tests/test_generators.py[1] .                           [OK]
sympy/combinatorics/tests/test_graycode.py[2] ..                            [OK]
sympy/combinatorics/tests/test_group_constructs.py[1] .                     [OK]
sympy/combinatorics/tests/test_homomorphisms.py[3] ...                      [OK]
sympy/combinatorics/tests/test_named_groups.py[6] ......                    [OK]
sympy/combinatorics/tests/test_partitions.py[5] .....                       [OK]
sympy/combinatorics/tests/test_pc_groups.py[3] ...                          [OK]
sympy/combinatorics/tests/test_perm_groups.py[61] ...............f..............
.f................w............                                             [OK]
sympy/combinatorics/tests/test_permutations.py[16] ................         [OK]
sympy/combinatorics/tests/test_polyhedron.py[2] ..                          [OK]
sympy/combinatorics/tests/test_prufer.py[2] ..                              [OK]
sympy/combinatorics/tests/test_rewriting.py[1] .                            [OK]
sympy/combinatorics/tests/test_schur_number.py[2] ..                        [OK]
sympy/combinatorics/tests/test_subsets.py[2] ..                             [OK]
sympy/combinatorics/tests/test_tensor_can.py[12] .........f..               [OK]
sympy/combinatorics/tests/test_testutil.py[5] .....                         [OK]
sympy/combinatorics/tests/test_util.py[8] ........                          [OK]
sympy/concrete/tests/test_delta.py[27] ...........................          [OK]
sympy/concrete/tests/test_gosper.py[11] ...........                         [OK]
sympy/concrete/tests/test_guess.py[6] ......                                [OK]
sympy/concrete/tests/test_products.py[22] ......................            [OK]
sympy/concrete/tests/test_sums_products.py[90] ...............w.................
....................w.f..............................f.w.                   [OK]
sympy/core/tests/test_args.py[983] ...s..s..sss.................................
..........................................sss............s................s.....
...s.ss....s...............s..........................ss...........sss.....s.s..
......................ss........................................................
............................................................s...................
............s...sss............s......s...sss..............sss..................
............s......s.....................ss..s............s.....................
..s....s..s....s..f...........s.s.............ss........s.......................
.............s.........................................s........................
......................s...............................................s..s...s..
................................s....s.s......s....s.....s..............s...s...
..........s...s...s........s................s...................................
..........................................................                  [OK]
sympy/core/tests/test_arit.py[99] .....................f.f......................
.....................................................                       [OK]
sympy/core/tests/test_assumptions.py[79] .......................f.....f.........
..............f........f................                                    [OK]
sympy/core/tests/test_basic.py[22] ......................                   [OK]
sympy/core/tests/test_cache.py[3] ...                                       [OK]
sympy/core/tests/test_compatibility.py[1] .                                 [OK]
sympy/core/tests/test_complex.py[18] ..................                     [OK]
sympy/core/tests/test_constructor_postprocessor.py[3] ..f                   [OK]
sympy/core/tests/test_containers.py[13] .............                       [OK]
sympy/core/tests/test_count_ops.py[4] ....                                  [OK]
sympy/core/tests/test_diff.py[8] ........                                   [OK]
sympy/core/tests/test_equal.py[6] ......                                    [OK]
sympy/core/tests/test_eval.py[8] ...f....                                   [OK]
sympy/core/tests/test_evalf.py[59] ......f.f....................................
..............                                                              [OK]
sympy/core/tests/test_expand.py[15] ...............                         [OK]
sympy/core/tests/test_expr.py[104] ................................f............
............................................f..............                 [OK]
sympy/core/tests/test_exprtools.py[13] .............                        [OK]
sympy/core/tests/test_facts.py[10] ..........                               [OK]
sympy/core/tests/test_function.py[86] .....................f....................
............................................                                [OK]
sympy/core/tests/test_kind.py[8] ........                                   [OK]
sympy/core/tests/test_logic.py[16] ................                         [OK]
sympy/core/tests/test_match.py[45] ..........f......................f...........
                                                                            [OK]
sympy/core/tests/test_multidimensional.py[1] .                              [OK]
sympy/core/tests/test_noncommutative.py[16] ..f.......ff....                [OK]
sympy/core/tests/test_numbers.py[107] ..........................................
................................f................................           [OK]
sympy/core/tests/test_operations.py[8] ........                             [OK]
sympy/core/tests/test_parameters.py[2] ..                                   [OK]
sympy/core/tests/test_power.py[39] .......................................  [OK]
sympy/core/tests/test_priority.py[7] .......                                [OK]
sympy/core/tests/test_random.py[1] .                                        [OK]
sympy/core/tests/test_relational.py[64] ...............f.....................f..
........................                                                    [OK]
sympy/core/tests/test_rules.py[1] .                                         [OK]
sympy/core/tests/test_singleton.py[3] ...                                   [OK]
sympy/core/tests/test_sorting.py[2] ..                                      [OK]
sympy/core/tests/test_subs.py[68] ..............................................
.f....................                                                      [OK]
sympy/core/tests/test_symbol.py[13] .............                           [OK]
sympy/core/tests/test_sympify.py[52] ...........f..............................f
.........                                                                   [OK]
sympy/core/tests/test_traversal.py[5] .....                                 [OK]
sympy/core/tests/test_truediv.py[3] ...                                     [OK]
sympy/core/tests/test_var.py[5] .....                                       [OK]
sympy/crypto/tests/test_crypto.py[51] ..........................................
.........                                                                   [OK]
sympy/diffgeom/tests/test_class_structure.py[3] ...                         [OK]
sympy/diffgeom/tests/test_diffgeom.py[16] ................                  [OK]
sympy/diffgeom/tests/test_function_diffgeom_book.py[4] ....                 [OK]
sympy/diffgeom/tests/test_hyperbolic_space.py[1] .                          [OK]
sympy/discrete/tests/test_convolutions.py[8] ........                       [OK]
sympy/discrete/tests/test_recurrences.py[1] .                               [OK]
sympy/discrete/tests/test_transforms.py[4] ....                             [OK]
sympy/external/tests/test_autowrap.py[16] ssssssssssssssss                  [OK]
Esympy/external/tests/test_importtools.py[4] ....                           [OK]
sympy/external/tests/test_numpy.py[23] .......................              [OK]
sympy/external/tests/test_pythonmpq.py[1] .                                 [OK]
sympy/functions/combinatorial/tests/test_comb_factorials.py[18] .............w..
f.                                                                          [OK]
sympy/functions/combinatorial/tests/test_comb_numbers.py[24] .........f.........
.....                                                                       [OK]
sympy/functions/elementary/tests/test_complexes.py[32] ....f...................f
.f.....                                                                     [OK]
sympy/functions/elementary/tests/test_exponential.py[46] .......................
.......f...........f...                                                     [OK]
sympy/functions/elementary/tests/test_hyperbolic.py[61] ........................
.....................................                                       [OK]
sympy/functions/elementary/tests/test_integers.py[10] ....f.....            [OK]
sympy/functions/elementary/tests/test_interface.py[3] ...                   [OK]
sympy/functions/elementary/tests/test_miscellaneous.py[17] ................. 
                                                                            [OK]
sympy/functions/elementary/tests/test_piecewise.py[62] ....ww...w...............
..............................w......                                       [OK]
sympy/functions/elementary/tests/test_trigonometric.py[81] .....................
...f..................................fww...................                [OK]
sympy/functions/special/tests/test_bessel.py[25] .........................  [OK]
sympy/functions/special/tests/test_beta_functions.py[3] ...                 [OK]
sympy/functions/special/tests/test_bsplines.py[11] .........w.              [OK]
sympy/functions/special/tests/test_delta_functions.py[3] ...                [OK]
sympy/functions/special/tests/test_elliptic_integrals.py[4] ....            [OK]
sympy/functions/special/tests/test_error_functions.py[24] ......................
..                                                                          [OK]
sympy/functions/special/tests/test_gamma_functions.py[19] ................... 
                                                                            [OK]
sympy/functions/special/tests/test_hyper.py[15] .........ww....             [OK]
sympy/functions/special/tests/test_mathieu.py[4] ....                       [OK]
sympy/functions/special/tests/test_singularity_functions.py[5] .....        [OK]
sympy/functions/special/tests/test_spec_polynomials.py[8] ........          [OK]
sympy/functions/special/tests/test_spherical_harmonics.py[3] ...            [OK]
sympy/functions/special/tests/test_tensor_functions.py[3] ...               [OK]
sympy/functions/special/tests/test_zeta_functions.py[15] ...............    [OK]
sympy/geometry/tests/test_curve.py[6] .w....                                [OK]
sympy/geometry/tests/test_ellipse.py[20] ..w........w........               [OK]
sympy/geometry/tests/test_entity.py[6] ......                               [OK]
sympy/geometry/tests/test_geometrysets.py[1] .                              [OK]
sympy/geometry/tests/test_line.py[34] ..................................    [OK]
sympy/geometry/tests/test_parabola.py[2] ..                                 [OK]
sympy/geometry/tests/test_plane.py[3] ...                                   [OK]
sympy/geometry/tests/test_point.py[13] .............                        [OK]
sympy/geometry/tests/test_polygon.py[24] w.......................           [OK]
sympy/geometry/tests/test_util.py[6] ......                                 [OK]
sympy/holonomic/tests/test_holonomic.py[27] ...........................     [OK]
sympy/holonomic/tests/test_recurrence.py[2] ..                              [OK]
sympy/integrals/tests/test_deltafunctions.py[2] ..                          [OK]
sympy/integrals/tests/test_failing_integrals.py[43] sffffwwwwfffwffffffwfwwfwfwf
fffffffffffffff                                                             [OK]
sympy/integrals/tests/test_heurisch.py[29] ................f....w...ww..    [OK]
sympy/integrals/tests/test_integrals.py[179] .w.................................
........w.....................................................................w.
.......ww..w.................w...............w.w.............ww.            [OK]
sympy/integrals/tests/test_intpoly.py[14] ..w...........                    [OK]
sympy/integrals/tests/test_lineintegrals.py[1] .                            [OK]
sympy/integrals/tests/test_manual.py[35] .....ww.......w....w..ww...w.w..w.. 
                                                                            [OK]
sympy/integrals/tests/test_meijerint.py[30] ......w....w..ww..............  [OK]
sympy/integrals/tests/test_prde.py[15] ...............                      [OK]
sympy/integrals/tests/test_quadrature.py[16] ................               [OK]
sympy/integrals/tests/test_rationaltools.py[11] ...........                 [OK]
sympy/integrals/tests/test_rde.py[10] ..........                            [OK]
sympy/integrals/tests/test_risch.py[35] ................................... [OK]
sympy/integrals/tests/test_singularityfunctions.py[1] .                     [OK]
sympy/integrals/tests/test_transforms.py[22] ...w..wwwww...........         [OK]
sympy/integrals/tests/test_trigonometry.py[4] ....                          [OK]
sympy/interactive/tests/test_interactive.py[1] .                            [OK]
sympy/interactive/tests/test_ipython.py[7] EEEEEEE                        [FAIL]
sympy/liealgebras/tests/test_cartan_matrix.py[1] .                          [OK]
sympy/liealgebras/tests/test_cartan_type.py[1] .                            [OK]
sympy/liealgebras/tests/test_dynkin_diagram.py[1] .                         [OK]
sympy/liealgebras/tests/test_root_system.py[1] .                            [OK]
sympy/liealgebras/tests/test_type_A.py[1] .                                 [OK]
sympy/liealgebras/tests/test_type_B.py[1] .                                 [OK]
sympy/liealgebras/tests/test_type_C.py[1] .                                 [OK]
sympy/liealgebras/tests/test_type_D.py[1] .                                 [OK]
sympy/liealgebras/tests/test_type_E.py[1] .                                 [OK]
sympy/liealgebras/tests/test_type_F.py[1] .                                 [OK]
sympy/liealgebras/tests/test_type_G.py[1] .                                 [OK]
sympy/liealgebras/tests/test_weyl_group.py[1] .                             [OK]
sympy/logic/tests/test_boolalg.py[82] ..........................................
....f..................w................                                    [OK]
sympy/logic/tests/test_dimacs.py[5] .....                                   [OK]
sympy/logic/tests/test_inference.py[22] ......................              [OK]
sympy/matrices/expressions/tests/test_adjoint.py[1] .                       [OK]
sympy/matrices/expressions/tests/test_applyfunc.py[5] .....                 [OK]
sympy/matrices/expressions/tests/test_blockmatrix.py[28] ..............w........
.....                                                                       [OK]
sympy/matrices/expressions/tests/test_companion.py[4] ....                  [OK]
sympy/matrices/expressions/tests/test_derivatives.py[11] ...........        [OK]
sympy/matrices/expressions/tests/test_determinant.py[5] .....               [OK]
sympy/matrices/expressions/tests/test_diagonal.py[3] ...                    [OK]
sympy/matrices/expressions/tests/test_dotproduct.py[2] ..                   [OK]
sympy/matrices/expressions/tests/test_factorizations.py[4] ....             [OK]
sympy/matrices/expressions/tests/test_fourier.py[3] ...                     [OK]
sympy/matrices/expressions/tests/test_funcmatrix.py[3] ...                  [OK]
sympy/matrices/expressions/tests/test_hadamard.py[8] ........               [OK]
sympy/matrices/expressions/tests/test_indexing.py[15] ..........f....       [OK]
sympy/matrices/expressions/tests/test_inverse.py[4] ....                    [OK]
sympy/matrices/expressions/tests/test_kronecker.py[18] ..................   [OK]
sympy/matrices/expressions/tests/test_matadd.py[8] .......f                 [OK]
sympy/matrices/expressions/tests/test_matexpr.py[40] .........................f.
....f........                                                               [OK]
sympy/matrices/expressions/tests/test_matmul.py[24] ...................f.... 
                                                                            [OK]
sympy/matrices/expressions/tests/test_matpow.py[17] .................       [OK]
sympy/matrices/expressions/tests/test_permutation.py[12] ............       [OK]
sympy/matrices/expressions/tests/test_sets.py[1] .                          [OK]
sympy/matrices/expressions/tests/test_slice.py[9] ......f..                 [OK]
sympy/matrices/expressions/tests/test_special.py[12] ............           [OK]
sympy/matrices/expressions/tests/test_trace.py[10] ..........               [OK]
sympy/matrices/expressions/tests/test_transpose.py[5] .....                 [OK]
sympy/matrices/tests/test_commonmatrix.py[79] ..................................
...................................f.........                               [OK]
sympy/matrices/tests/test_decompositions.py[12] ...........w                [OK]
sympy/matrices/tests/test_determinant.py[9] .........                       [OK]
sympy/matrices/tests/test_eigen.py[19] .w.f....w..........                  [OK]
sympy/matrices/tests/test_graph.py[2] ..                                    [OK]
sympy/matrices/tests/test_immutable.py[10] ..........                       [OK]
sympy/matrices/tests/test_interactions.py[7] .......                        [OK]
sympy/matrices/tests/test_matrices.py[180] .....................................
................................................................................
............................f......w.....s...................E.           [FAIL]
sympy/matrices/tests/test_normalforms.py[3] ...                             [OK]
sympy/matrices/tests/test_reductions.py[10] ..........                      [OK]
sympy/matrices/tests/test_solvers.py[16] ................                   [OK]
sympy/matrices/tests/test_sparse.py[16] ................                    [OK]
sympy/matrices/tests/test_sparsetools.py[3] ...                             [OK]
sympy/matrices/tests/test_subspaces.py[5] .....                             [OK]
sympy/multipledispatch/tests/test_conflict.py[7] .......                    [OK]
sympy/multipledispatch/tests/test_core.py[12] ............                  [OK]
sympy/multipledispatch/tests/test_dispatcher.py[17] .................       [OK]
sympy/ntheory/tests/test_bbp_pi.py[1] .                                     [OK]
sympy/ntheory/tests/test_continued_fraction.py[1] .                         [OK]
sympy/ntheory/tests/test_digits.py[3] ...                                   [OK]
sympy/ntheory/tests/test_ecm.py[2] w.                                       [OK]
sympy/ntheory/tests/test_egyptian_fraction.py[2] ..                         [OK]
sympy/ntheory/tests/test_elliptic_curve.py[1] .                             [OK]
sympy/ntheory/tests/test_factor_.py[35] ....w.............................. [OK]
sympy/ntheory/tests/test_generate.py[11] ...........                        [OK]
sympy/ntheory/tests/test_modular.py[2] ..                                   [OK]
sympy/ntheory/tests/test_multinomial.py[3] ...                              [OK]
sympy/ntheory/tests/test_partitions.py[1] .                                 [OK]
sympy/ntheory/tests/test_primetest.py[6] ..w...                             [OK]
sympy/ntheory/tests/test_residue.py[1] .                                    [OK]
sympy/parsing/tests/test_ast_parser.py[1] .                                 [OK]
sympy/parsing/tests/test_c_parser.py[1] .                                   [OK]
sympy/parsing/tests/test_fortran_parser.py[1] .                             [OK]
sympy/parsing/tests/test_implicit_multiplication_application.py[6] ......   [OK]
sympy/parsing/tests/test_latex_deps.py[1] .                                 [OK]
sympy/parsing/tests/test_mathematica.py[1] .                                [OK]
sympy/parsing/tests/test_maxima.py[3] ...                                   [OK]
sympy/parsing/tests/test_sym_expr.py[1] .                                   [OK]
sympy/parsing/tests/test_sympy_parser.py[28] ............................   [OK]
sympy/physics/continuum_mechanics/tests/test_beam.py[19] ................... 
                                                                            [OK]
sympy/physics/control/tests/test_control_plots.py[6] .f.fff                 [OK]
sympy/physics/control/tests/test_lti.py[22] ......................          [OK]
sympy/physics/hep/tests/test_gamma_matrices.py[4] ....                      [OK]
sympy/physics/mechanics/tests/test_body.py[16] ................             [OK]
sympy/physics/mechanics/tests/test_functions.py[11] ...........             [OK]
sympy/physics/mechanics/tests/test_joint.py[8] ........                     [OK]
sympy/physics/mechanics/tests/test_jointsmethod.py[6] ......                [OK]
sympy/physics/mechanics/tests/test_kane.py[7] .......                       [OK]
sympy/physics/mechanics/tests/test_kane2.py[4] ....                         [OK]
sympy/physics/mechanics/tests/test_kane3.py[1] w                            [OK]
sympy/physics/mechanics/tests/test_kane4.py[1] .                            [OK]
sympy/physics/mechanics/tests/test_lagrange.py[5] .....                     [OK]
sympy/physics/mechanics/tests/test_lagrange2.py[1] .                        [OK]
sympy/physics/mechanics/tests/test_linearize.py[6] w.....                   [OK]
sympy/physics/mechanics/tests/test_method.py[1] .                           [OK]
sympy/physics/mechanics/tests/test_models.py[4] ....                        [OK]
sympy/physics/mechanics/tests/test_particle.py[3] ...                       [OK]
sympy/physics/mechanics/tests/test_rigidbody.py[6] ......                   [OK]
sympy/physics/mechanics/tests/test_system.py[5] .....                       [OK]
sympy/physics/optics/tests/test_gaussopt.py[1] .                            [OK]
sympy/physics/optics/tests/test_medium.py[1] .                              [OK]
sympy/physics/optics/tests/test_polarization.py[1] .                        [OK]
sympy/physics/optics/tests/test_utils.py[12] ............                   [OK]
sympy/physics/optics/tests/test_waves.py[1] .                               [OK]
sympy/physics/quantum/tests/test_anticommutator.py[4] ....                  [OK]
sympy/physics/quantum/tests/test_boson.py[2] ..                             [OK]
sympy/physics/quantum/tests/test_cartesian.py[3] ...                        [OK]
sympy/physics/quantum/tests/test_cg.py[3] ...                               [OK]
sympy/physics/quantum/tests/test_circuitplot.py[8] ........                 [OK]
sympy/physics/quantum/tests/test_circuitutils.py[7] .....ww                 [OK]
sympy/physics/quantum/tests/test_commutator.py[4] ....                      [OK]
sympy/physics/quantum/tests/test_constants.py[1] .                          [OK]
sympy/physics/quantum/tests/test_dagger.py[6] .....s                        [OK]
sympy/physics/quantum/tests/test_density.py[11] ...........                 [OK]
sympy/physics/quantum/tests/test_fermion.py[2] ..                           [OK]
sympy/physics/quantum/tests/test_gate.py[26] ..........................     [OK]
sympy/physics/quantum/tests/test_grover.py[6] ......                        [OK]
sympy/physics/quantum/tests/test_hilbert.py[7] .......                      [OK]
sympy/physics/quantum/tests/test_identitysearch.py[10] .....s....           [OK]
sympy/physics/quantum/tests/test_innerproduct.py[3] ...                     [OK]
sympy/physics/quantum/tests/test_matrixutils.py[8] ....s..s                 [OK]
sympy/physics/quantum/tests/test_operator.py[8] ........                    [OK]
sympy/physics/quantum/tests/test_operatorordering.py[2] ..                  [OK]
sympy/physics/quantum/tests/test_operatorset.py[3] ...                      [OK]
sympy/physics/quantum/tests/test_pauli.py[12] ............                  [OK]
sympy/physics/quantum/tests/test_piab.py[2] ..                              [OK]
sympy/physics/quantum/tests/test_printing.py[16] .....f..........           [OK]
sympy/physics/quantum/tests/test_qapply.py[12] ............                 [OK]
sympy/physics/quantum/tests/test_qasm.py[17] .................              [OK]
sympy/physics/quantum/tests/test_qexpr.py[5] .....                          [OK]
sympy/physics/quantum/tests/test_qft.py[3] ...                              [OK]
sympy/physics/quantum/tests/test_qubit.py[11] ...........                   [OK]
sympy/physics/quantum/tests/test_represent.py[9] ....ss...                  [OK]
sympy/physics/quantum/tests/test_sho1d.py[5] s....                          [OK]
sympy/physics/quantum/tests/test_shor.py[2] f.                              [OK]
sympy/physics/quantum/tests/test_spin.py[39] .............w.....................
....                                                                        [OK]
sympy/physics/quantum/tests/test_state.py[8] ........                       [OK]
sympy/physics/quantum/tests/test_tensorproduct.py[8] ........               [OK]
sympy/physics/quantum/tests/test_trace.py[4] ....                           [OK]
sympy/physics/tests/test_clebsch_gordan.py[11] ...........                  [OK]
sympy/physics/tests/test_hydrogen.py[5] .....                               [OK]
sympy/physics/tests/test_paulialgebra.py[3] ..f                             [OK]
sympy/physics/tests/test_physics_matrices.py[4] ....                        [OK]
sympy/physics/tests/test_pring.py[4] ....                                   [OK]
sympy/physics/tests/test_qho_1d.py[5] .....                                 [OK]
sympy/physics/tests/test_secondquant.py[53] ..............w.....................
.................                                                           [OK]
sympy/physics/tests/test_sho.py[2] ..                                       [OK]
sympy/physics/units/tests/test_dimensions.py[7] .......                     [OK]
sympy/physics/units/tests/test_dimensionsystem.py[8] ........               [OK]
sympy/physics/units/tests/test_prefixes.py[4] ....                          [OK]
sympy/physics/units/tests/test_quantities.py[28] ..................f......... 
                                                                            [OK]
sympy/physics/units/tests/test_unit_system_cgs_gauss.py[2] ..               [OK]
sympy/physics/units/tests/test_unitsystem.py[6] ......                      [OK]
sympy/physics/units/tests/test_util.py[9] .........                         [OK]
sympy/physics/vector/tests/test_dyadic.py[6] ......                         [OK]
sympy/physics/vector/tests/test_fieldfunctions.py[7] .......                [OK]
sympy/physics/vector/tests/test_frame.py[25] .........................      [OK]
sympy/physics/vector/tests/test_functions.py[11] ...........                [OK]
sympy/physics/vector/tests/test_output.py[1] .                              [OK]
sympy/physics/vector/tests/test_point.py[19] ...................            [OK]
sympy/physics/vector/tests/test_printing.py[14] ..............              [OK]
sympy/physics/vector/tests/test_vector.py[7] .......                        [OK]
sympy/plotting/intervalmath/tests/test_interval_functions.py[24] ...............
.........                                                                   [OK]
sympy/plotting/intervalmath/tests/test_interval_membership.py[7] .......    [OK]
sympy/plotting/intervalmath/tests/test_intervalmath.py[7] .......           [OK]
sympy/plotting/tests/test_experimental_lambdify.py[2] ..                    [OK]
sympy/plotting/tests/test_plot.py[23] ....
/lib/python3.10/site-packages/sympy/plotting/experimental_lambdify.py:142: UserWarning: The evaluation of the expression is problematic. We are trying a failback method that may still work. Please report this as a bug.
  warnings.warn(
...................               [OK]
sympy/plotting/tests/test_plot_implicit.py[4] f...                          [OK]
sympy/plotting/tests/test_textplot.py[4] ....                               [OK]
sympy/polys/agca/tests/test_extensions.py[10] ..........                    [OK]
sympy/polys/agca/tests/test_homomorphisms.py[4] ....                        [OK]
sympy/polys/agca/tests/test_ideals.py[7] .......                            [OK]
sympy/polys/agca/tests/test_modules.py[16] ................                 [OK]
sympy/polys/domains/tests/test_domains.py[40] ..................................
......                                                                      [OK]
sympy/polys/domains/tests/test_polynomialring.py[5] .....                   [OK]
sympy/polys/domains/tests/test_quotientring.py[2] ..                        [OK]
sympy/polys/matrices/tests/test_ddm.py[34] .................................. 
                                                                            [OK]
sympy/polys/matrices/tests/test_dense.py[13] .............                  [OK]
sympy/polys/matrices/tests/test_domainmatrix.py[59] ............................
...............................                                             [OK]
sympy/polys/matrices/tests/test_domainscalar.py[19] ...................     [OK]
sympy/polys/matrices/tests/test_eigen.py[3] ...                             [OK]
sympy/polys/matrices/tests/test_linsolve.py[3] ...                          [OK]
sympy/polys/matrices/tests/test_normalforms.py[2] ..                        [OK]
sympy/polys/matrices/tests/test_sdm.py[42] .....................................
.....                                                                       [OK]
sympy/polys/numberfields/tests/test_basis.py[2] ..                          [OK]
sympy/polys/numberfields/tests/test_minpoly.py[21] .........w...........    [OK]
sympy/polys/numberfields/tests/test_modules.py[52] .............................
.......................                                                     [OK]
sympy/polys/numberfields/tests/test_numbers.py[3] ...                       [OK]
sympy/polys/numberfields/tests/test_primes.py[15] ...............           [OK]
sympy/polys/numberfields/tests/test_subfield.py[6] ......                   [OK]
sympy/polys/numberfields/tests/test_utilities.py[8] ........                [OK]
sympy/polys/tests/test_constructor.py[5] .....                              [OK]
sympy/polys/tests/test_densearith.py[51] .......................................
............                                                                [OK]
sympy/polys/tests/test_densebasic.py[58] .......................................
...................                                                         [OK]
sympy/polys/tests/test_densetools.py[36] .................................... 
                                                                            [OK]
sympy/polys/tests/test_dispersion.py[1] .                                   [OK]
sympy/polys/tests/test_distributedmodules.py[20] ....................       [OK]
sympy/polys/tests/test_euclidtools.py[16] ................                  [OK]
sympy/polys/tests/test_factortools.py[25] ............f............         [OK]
sympy/polys/tests/test_fields.py[22] .................f....                 [OK]
sympy/polys/tests/test_galoistools.py[33] ................................. [OK]
sympy/polys/tests/test_groebnertools.py[24] .........w..............        [OK]
sympy/polys/tests/test_heuristicgcd.py[3] ...                               [OK]
sympy/polys/tests/test_injections.py[2] ..                                  [OK]
sympy/polys/tests/test_modulargcd.py[7] .......                             [OK]
sympy/polys/tests/test_monomials.py[11] ...........                         [OK]
sympy/polys/tests/test_multivariate_resultants.py[15] ...............       [OK]
sympy/polys/tests/test_orderings.py[7] .......                              [OK]
sympy/polys/tests/test_orthopolys.py[8] ........                            [OK]
sympy/polys/tests/test_partfrac.py[12] .........f..                         [OK]
sympy/polys/tests/test_polyclasses.py[19] ...................               [OK]
sympy/polys/tests/test_polyfuncs.py[5] .....                                [OK]
sympy/polys/tests/test_polymatrix.py[10] ..........                         [OK]
sympy/polys/tests/test_polyoptions.py[46] ......................................
........                                                                    [OK]
sympy/polys/tests/test_polyroots.py[29] .......................w.....       [OK]
sympy/polys/tests/test_polytools.py[159] .......................................
................................................................................
........................................                                    [OK]
sympy/polys/tests/test_polyutils.py[11] ...........                         [OK]
sympy/polys/tests/test_pythonrational.py[14] ..............                 [OK]
sympy/polys/tests/test_rationaltools.py[1] .                                [OK]
sympy/polys/tests/test_ring_series.py[31] ...............................   [OK]
sympy/polys/tests/test_rings.py[63] ............................................
...................                                                         [OK]
sympy/polys/tests/test_rootisolation.py[23] .......................         [OK]
sympy/polys/tests/test_rootoftools.py[31] ........w...................w..   [OK]
sympy/polys/tests/test_solvers.py[10] ..........                            [OK]
sympy/polys/tests/test_specialpolys.py[8] ........                          [OK]
sympy/polys/tests/test_sqfreetools.py[3] ...                                [OK]
sympy/polys/tests/test_subresultants_qq_zz.py[25] ......................... [OK]
sympy/printing/pretty/tests/test_pretty.py[149] ................................
................................................................................
.....................................                                       [OK]
sympy/printing/tests/test_c.py[53] .........................................f...
........                                                                    [OK]
sympy/printing/tests/test_codeprinter.py[3] ...                             [OK]
sympy/printing/tests/test_conventions.py[3] ..f                             [OK]
sympy/printing/tests/test_cupy.py[5] ..s..                                  [OK]
sympy/printing/tests/test_cxx.py[8] ........                                [OK]
sympy/printing/tests/test_dot.py[10] ..........                             [OK]
sympy/printing/tests/test_fortran.py[43] .......................................
....                                                                        [OK]
sympy/printing/tests/test_glsl.py[37] ..................................... [OK]
sympy/printing/tests/test_gtk.py[2] f.                                      [OK]
sympy/printing/tests/test_jscode.py[25] .........................           [OK]
sympy/printing/tests/test_julia.py[33] ...............f.................    [OK]
sympy/printing/tests/test_lambdarepr.py[10] ..........                      [OK]
sympy/printing/tests/test_latex.py[165] .........f..............................
...........................................................................f....
.............................................                               [OK]
sympy/printing/tests/test_maple.py[35] ...................................  [OK]
sympy/printing/tests/test_mathematica.py[16] ................               [OK]
sympy/printing/tests/test_mathml.py[108] .......................................
.....................................................................       [OK]
sympy/printing/tests/test_numpy.py[25] .........................            [OK]
sympy/printing/tests/test_octave.py[43] ..................f.....................
...                                                                         [OK]
sympy/printing/tests/test_precedence.py[13] .............                   [OK]
sympy/printing/tests/test_preview.py[3] ...                                 [OK]
sympy/printing/tests/test_pycode.py[21] .......s.............               [OK]
sympy/printing/tests/test_python.py[12] .....f....s.                        [OK]
sympy/printing/tests/test_rcode.py[33] .................................    [OK]
sympy/printing/tests/test_repr.py[46] ..........................................
....                                                                        [OK]
sympy/printing/tests/test_rust.py[25] .........................             [OK]
sympy/printing/tests/test_str.py[108] ..........................................
..................................................................          [OK]
sympy/printing/tests/test_tableform.py[2] ..                                [OK]
sympy/printing/tests/test_tensorflow.py[9] .f.sfss..                        [OK]
sympy/printing/tests/test_tree.py[2] f.                                     [OK]
sympy/sandbox/tests/test_indexed_integrals.py[1] .                          [OK]
sympy/series/tests/test_approximants.py[1] .                                [OK]
sympy/series/tests/test_aseries.py[2] ..                                    [OK]
sympy/series/tests/test_demidovich.py[17] .................                 [OK]
sympy/series/tests/test_formal.py[20] ......ww.....f......                  [OK]
sympy/series/tests/test_fourier.py[8] ........                              [OK]
sympy/series/tests/test_gruntz.py[42] wswsf.f......................f........f...
                                                                            [OK]
sympy/series/tests/test_kauers.py[2] ..                                     [OK]
sympy/series/tests/test_limits.py[143] .....................f................f..
......f...............................................f.........................
......................                                                      [OK]
sympy/series/tests/test_limitseq.py[14] .............f                      [OK]
sympy/series/tests/test_lseries.py[7] .......                               [OK]
sympy/series/tests/test_nseries.py[68] .................f.......................
...........................                                                 [OK]
sympy/series/tests/test_order.py[55] ...........................................
............                                                                [OK]
sympy/series/tests/test_residues.py[13] .....f.......                       [OK]
sympy/series/tests/test_sequences.py[16] ..............w.                   [OK]
sympy/series/tests/test_series.py[34] ..................................    [OK]
sympy/sets/tests/test_conditionset.py[14] ..............                    [OK]
sympy/sets/tests/test_contains.py[6] ......                                 [OK]
sympy/sets/tests/test_fancysets.py[53] .........................................
.....f......                                                                [OK]
sympy/sets/tests/test_ordinals.py[9] .........                              [OK]
sympy/sets/tests/test_powerset.py[10] ....X.....                            [OK]
sympy/sets/tests/test_setexpr.py[15] ...............                        [OK]
sympy/sets/tests/test_sets.py[103] .........................................f...
........f......f.............................f.........f..                  [OK]
sympy/simplify/tests/test_combsimp.py[3] ...                                [OK]
sympy/simplify/tests/test_cse.py[47] .........f.fff....................f........
....                                                                        [OK]
sympy/simplify/tests/test_epathtools.py[3] ...                              [OK]
sympy/simplify/tests/test_fu.py[28] ............................            [OK]
sympy/simplify/tests/test_function.py[6] ......                             [OK]
sympy/simplify/tests/test_gammasimp.py[2] ..                                [OK]
sympy/simplify/tests/test_hyperexpand.py[45] ...f....w......w.fw.w.....w.wwwwwww
.w..wfff..                                                                  [OK]
sympy/simplify/tests/test_powsimp.py[18] ..................                 [OK]
sympy/simplify/tests/test_radsimp.py[26] ..........................         [OK]
sympy/simplify/tests/test_ratsimp.py[2] ..                                  [OK]
sympy/simplify/tests/test_rewrite.py[2] ..                                  [OK]
sympy/simplify/tests/test_simplify.py[62] ..........................f...........
..........w.....ff......                                                    [OK]
sympy/simplify/tests/test_sqrtdenest.py[14] ..............                  [OK]
sympy/simplify/tests/test_trigsimp.py[28] ........................f...      [OK]
sympy/solvers/diophantine/tests/test_diophantine.py[49] ............w...........
.............f......f....                                                   [OK]
sympy/solvers/ode/tests/test_lie_group.py[9] ......f.f                      [OK]
sympy/solvers/ode/tests/test_ode.py[34] ...w......f.............w.........  [OK]
sympy/solvers/ode/tests/test_riccati.py[16] ...............w                [OK]
sympy/solvers/ode/tests/test_single.py[39] ..w[www.wwww.w..ww.www.www..www.w](https://www.wwww.w..ww.www.www..www.w/).....
..                                                                          [OK]
sympy/solvers/ode/tests/test_subscheck.py[2] w.                             [OK]
sympy/solvers/ode/tests/test_systems.py[42] .....w..w..w..w...www[www.wwww..w.wfw](https://www.wwww..w.wfw/)
f..w..                                                                      [OK]
sympy/solvers/tests/test_constantsimp.py[11] .........f.                    [OK]
sympy/solvers/tests/test_decompogen.py[4] ..f.                              [OK]
sympy/solvers/tests/test_inequalities.py[27] ................f.....f....    [OK]
sympy/solvers/tests/test_numeric.py[11] f..........                         [OK]
sympy/solvers/tests/test_pde.py[11] ...........                             [OK]
sympy/solvers/tests/test_polysys.py[4] ....                                 [OK]
sympy/solvers/tests/test_recurr.py[11] .........w.                          [OK]
sympy/solvers/tests/test_solvers.py[135] .......................f....w..........
.....wwf...w.......................fw.f..............w...ww..w..........w.......
................                                                            [OK]
sympy/solvers/tests/test_solveset.py[183] .....f..........fw....................
..s..........fff....f.................f....f..............s.....................
.........................f...ff...f...........f..................           [OK]
sympy/stats/sampling/tests/test_sample_continuous_rv.py[8] .sssssss         [OK]
sympy/stats/sampling/tests/test_sample_discrete_rv.py[4] .ssw               [OK]
sympy/stats/sampling/tests/test_sample_finite_rv.py[5] s.ss.                [OK]
sympy/stats/tests/test_compound_rv.py[6] ......                             [OK]
sympy/stats/tests/test_continuous_rv.py[84] ...w.......................w........
....................

I ran it again and it got to that same spot and hung, so I think there is some issue there.

We need to

Likely many issues will actually be issues with pyodide upstream (like the sys.stdout.encoding thing), so we should report those as we find them, and work around them if it isn't too hard.

asmeurer commented 2 years ago

The test_ipython failures are like

________ sympy/interactive/tests/test_ipython.py:test_automatic_symbols ________
Traceback (most recent call last):
  File "/lib/python3.10/site-packages/sympy/interactive/tests/test_ipython.py", line 33, in test_automatic_symbols
    app = init_ipython_session()
  File "/lib/python3.10/site-packages/sympy/interactive/session.py", line 250, in init_ipython_session
    app.initialize(argv)
  File "/lib/python3.10/site-packages/traitlets/config/application.py", line 88, in inner
    return method(app, *args, **kwargs)
  File "/lib/python3.10/site-packages/IPython/terminal/ipapp.py", line 279, in initialize
    self.init_shell()
  File "/lib/python3.10/site-packages/IPython/terminal/ipapp.py", line 293, in init_shell
    self.shell = self.interactive_shell_class.instance(parent=self,
  File "/lib/python3.10/site-packages/traitlets/config/configurable.py", line 549, in instance
    raise MultipleInstanceError(
traitlets.config.configurable.MultipleInstanceError: An incompatible sibling of 'TerminalInteractiveShell' is already instanciated as singleton: Interpreter

They seem to be related to the fact that we are running the tests from inside of jupyterlite.

The matrices error is

____________ sympy/matrices/tests/test_matrices.py:test_issue_19809 ____________
Traceback (most recent call last):
  File "/lib/python3.10/site-packages/sympy/matrices/tests/test_matrices.py", line 2994, in test_issue_19809
    future = executor.submit(f)
  File "/lib/python3.10/concurrent/futures/thread.py", line 176, in submit
    self._adjust_thread_count()
  File "/lib/python3.10/concurrent/futures/thread.py", line 199, in _adjust_thread_count
    t.start()
  File "/lib/python3.10/threading.py", line 928, in start
    _start_new_thread(self._bootstrap, ())
RuntimeError: can't start new thread

So it's trying to use threading, which isn't supported. We might want to disable this test in pyodide (or any other environment that doesn't have threading).

I haven't yet tried running any of the tests past the point where it stopped above. Interrupting the kernel doesn't seem to work very well in jupyterlite, so it's hard to tell where it is hanging.

But aside from the hanging test, everything seems to be working.