Files
mpmath--mpmath/mpmath/tests/test_module.py
T
Colin B. Macdonald b7ed1b82cd prevent erroneous setting of dps/prec on mpmath module (#678)
* Use sys.modules hacks to prevent setting dps/prec

Fixes Issue #657

---------

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Warren Weckesser <warren.weckesser@gmail.com>
2024-01-05 14:36:00 +03:00

19 lines
391 B
Python

"""
Modules checks, in particular some hacks for Issue #657
"""
from pytest import raises
import mpmath
def test_erroneous_module_setting():
with raises(AttributeError):
mpmath.dps = 64
with raises(AttributeError):
mpmath.prec = 192
with raises(AttributeError):
mpmath.pretty = True
with raises(AttributeError):
mpmath.trap_complex = True