FirebirdSQL / python3-driver

Firebird driver for Python that uses new Firebird API
https://www.firebirdsql.org/en/devel-python-driver/
MIT License
27 stars 10 forks source link

Initial Proof-of-Concept for #22 (use Firebird embedded for Tests) #23

Open fdcastel opened 1 year ago

fdcastel commented 1 year ago

Initial Proof-of-Concept for #22. Do not merge. For initial review only.

Use the script Rebuild-Databases to

Use the script Set-TestEnvironment to update .env file used by VSCode to discover and run tests.

fdcastel commented 1 year ago

Added @pcisar suggestions from #22.

With one difference: it is still using the databases built from Powershell script (instead of the commited ones).

I believe the best course of action from here would be to incorporate the Rebuild-Databases.ps1 logic into tests Setup (in Python).

There are other databases already being created (e.g. fbevents.fdb) in some test cases. Ideally all of them should be built from a single piece of code.

I'll look into this in the next few days. I believe it will make everything simpler.

fdcastel commented 1 year ago

I'll look into this in the next few days. I believe it will make everything simpler.

@pcisar if you have other considerations, please comment.

fdcastel commented 1 year ago

@pcisar do you have the script to build fbtest30-src.fbk from scratch?

I tried to reverse engineer it but my tools cannot decode the ARRAY columns.

The idea is to rebuild the databases from SQL instead from gbak / .fbk.

fdcastel commented 1 year ago

Offtopic. Sometimes I got these errors

./test_driver.py::TestServerStandard::test_wait Failed with Error: 'ascii' codec can't decode byte 0xe3 in position 3280: ordinal not in range(128)
./test_driver.py::TestServerStandard::test_running Failed with Error: 'ascii' codec can't decode byte 0xe3 in position 3280: ordinal not in range(128)

./test_driver.py::TestServerServices::test_01_output_by_line Failed with Error: 'ascii' codec can't decode byte 0xe3 in position 2: ordinal not in range(128)
./test_driver.py::TestServerServices::test_02_output_to_eof Failed with Error: 'ascii' codec can't decode byte 0xe3 in position 3280: ordinal not in range(128)
./test_driver.py::TestServerServices::test_03_log Failed with Error: 'ascii' codec can't decode byte 0xe3 in position 3280: ordinal not in range(128)

I have no idea where they come from. It seems something related to UTF8 (which uses 128 as special marker)?

fdcastel commented 1 year ago

@pcisar Could you help me with this one?

@pcisar do you have the script to build fbtest30-src.fbk from scratch?

I tried to reverse engineer it but my tools cannot decode the ARRAY columns.

The idea is to rebuild the databases from SQL instead from gbak / .fbk.