File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -1035,6 +1035,8 @@ function to temporarily change the active context.
10351035 IEEE interchange formats. The argument must be a multiple of 32 and less
10361036 than :const: `IEEE_CONTEXT_MAX_BITS `.
10371037
1038+ .. versionadded :: 3.14
1039+
10381040New contexts can also be created using the :class: `Context ` constructor
10391041described below. In addition, the module provides three pre-made contexts:
10401042
Original file line number Diff line number Diff line change @@ -4417,15 +4417,15 @@ def assert_rest(self, context):
44174417 assert_rest (self , c )
44184418
44194419 # Invalid values
4420- self .assertRaises (OverflowError , IEEEContext , 2 ** 63 )
4420+ self .assertRaises (OverflowError , IEEEContext , sys . maxsize + 1 )
44214421 self .assertRaises (ValueError , IEEEContext , - 1 )
4422+ self .assertRaises (ValueError , IEEEContext , 123 )
44224423 self .assertRaises (ValueError , IEEEContext , 1024 )
44234424
44244425 def test_constants (self ):
44254426 # IEEEContext
44264427 IEEE_CONTEXT_MAX_BITS = self .decimal .IEEE_CONTEXT_MAX_BITS
4427- if IEEE_CONTEXT_MAX_BITS != 256 :
4428- self .assertEqual (IEEE_CONTEXT_MAX_BITS , 512 )
4428+ self .assertIn (IEEE_CONTEXT_MAX_BITS , {256 , 512 })
44294429
44304430@requires_cdecimal
44314431class CIEEEContexts (IEEEContexts , unittest .TestCase ):
You can’t perform that action at this time.
0 commit comments