pyodbc

repository·master·Indexed 25 days ago

https://github.com/mkleehammer/pyodbc

An open source Python module that implements the Python DB API 2.0 specification to simplify access to ODBC databases.

Tokens
475
Snippets
5
Records
6
Agent score
35%

What's inside pyodbc

  1. Build and run tests manually for development

    master

    For fast development turnaround without using tox, you can build the library in-place and run pytest manually. Building with the --inplace flag ensures the library is built into the root directory, making it available in the path for your tests.

    To build the extension in-place:

    python setup.py build_ext --inplace

    To run a specific test (e.g., test_text in test_postgresql.py):

    pytest test/test_postgresql.py -vxk test_text
    python setup.py build_ext --inplace
    pytest test/test_postgresql.py -vxk test_text
  2. Debug segmentation faults during testing

    master

    If a segmentation fault occurs during testing, pytest may suppress the output. To see the output and debug the crash, enable PYODBC_TRACE during the build and add the -s flag to your pytest command to prevent output buffering.

    Use the following commands to debug:

    python setup.py build_ext --inplace -D PYODBC_TRACE
    pytest test/test_postgresql.py -vxk test_text -vs
    python setup.py build_ext --inplace -D PYODBC_TRACE
    pytest test/test_postgresql.py -vxk test_text -vs