@@ -2685,13 +2685,13 @@ def _all_mpolys():
26852685 (
26862686 flint .nmod_mpoly ,
26872687 lambda * args , ** kwargs : flint .nmod_mpoly_ctx .get_context (* args , ** kwargs , modulus = 101 ),
2688- int ,
2688+ lambda x : flint . nmod ( x , 101 ) ,
26892689 True ,
26902690 ),
26912691 (
26922692 flint .nmod_mpoly ,
26932693 lambda * args , ** kwargs : flint .nmod_mpoly_ctx .get_context (* args , ** kwargs , modulus = 100 ),
2694- int ,
2694+ lambda x : flint . nmod ( x , 100 ) ,
26952695 False ,
26962696 ),
26972697 ]
@@ -2767,10 +2767,15 @@ def quick_poly():
27672767 assert (P (1 , ctx = ctx ) == P (2 , ctx = ctx )) is False
27682768 assert (P (1 , ctx = ctx ) != P (2 , ctx = ctx )) is True
27692769
2770- assert (P (1 , ctx = ctx ) == 1 ) is False
2771- assert (P (1 , ctx = ctx ) != 1 ) is True
2772- assert (1 == P (1 , ctx = ctx )) is False
2773- assert (1 != P (1 , ctx = ctx )) is True
2770+ assert (P (1 , ctx = ctx ) == 1 ) is True
2771+ assert (P (1 , ctx = ctx ) != 1 ) is False
2772+ assert (1 == P (1 , ctx = ctx )) is True
2773+ assert (1 != P (1 , ctx = ctx )) is False
2774+
2775+ assert (P (1 , ctx = ctx ) == S (1 )) is True
2776+ assert (P (1 , ctx = ctx ) != S (1 )) is False
2777+ assert (S (1 ) == P (1 , ctx = ctx )) is True
2778+ assert (S (1 ) != P (1 , ctx = ctx )) is False
27742779
27752780 assert (P (1 , ctx = ctx ) == P (1 , ctx = ctx1 )) is False
27762781 assert (P (1 , ctx = ctx ) != P (1 , ctx = ctx1 )) is True
@@ -2926,7 +2931,7 @@ def quick_poly():
29262931 else {k : ctx .modulus () + v for k , v in {(0 , 0 ): - 4 , (0 , 1 ): - 4 , (1 , 0 ): - 4 , (2 , 2 ): - 4 }.items ()}
29272932 )
29282933
2929- for T in [int , S , lambda x : P (x , ctx = ctx )]:
2934+ for T in [int , S , int , lambda x : P (x , ctx = ctx )]:
29302935 p = quick_poly ()
29312936 p -= T (1 )
29322937 q = quick_poly ()
@@ -2955,7 +2960,7 @@ def quick_poly():
29552960 (0 , 1 ): 6
29562961 })
29572962
2958- for T in [int , S , lambda x : P (x , ctx = ctx )]:
2963+ for T in [int , S , int , lambda x : P (x , ctx = ctx )]:
29592964 p = quick_poly ()
29602965 p *= T (2 )
29612966 q = quick_poly ()
0 commit comments