denisenkom / pytds

Python DBAPI driver for MSSQL using pure Python TDS (Tabular Data Stream) protocol implementation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Large decimal values result in errors if the ambient decimal context does not have a high enough precision

LHCGreg opened this issue · comments

Discovered this as a result of some decimal-related tests in connected_tests.py failing if running only the tests on connected_tests.py, not all the tests, using pytest tests/connected_test.py. all_test.py sets getcontext().prec = 38, which gets run before connected_tests.py if you are running all the tests, but does not get run if you are running only the tests in connected_tests.py. pytds should behave correctly with the default decimal context.

PR incoming.