-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suggestion: use Firebird embedded engines for tests? #22
Comments
Well, while I'm not against the idea, I'll insist that it must be an optional alternative, not the default one.
Generally, next month I'd like add support for FB5 to the driver, incl. tests, so I'll also add support for customization as outlined above. |
Suggestions pushed to #23. |
@pcisar I'm working again on this one and have already automated both environments for Linux and Windows. Now I'm only missing the scripts to build If you can provide them, I can submit a full PR to build everything from the ground up. Both on Linux and Windows. |
Well, you can use isql -x (or any other FB admin tool that can extract metadata as SQL) to get such script. Similarly it's possible to convert data stored in test database as SQL INSERTs. The sole problem is that isql is not able to work with ARRAY column values. |
I believe this was exactly what I told you, half year ago, in #23. That's why I'm asking you the source scripts. |
I know. But the ARRAY and to some extent BLOBs (text are easy since FB supports conversion from varchar or text literals, but binary or other sub types are still a problem) are the reason why test database was manually created and there is no SQL script to create it (it's that way since dawn of FDB time). AFAIK there is still no way around it. Of course, it could be handled by python script using the driver. Kind of weird approach to use driver to prepare test for driver, but they do it anyway to some extent in setup/teardown, so probably why not? But as the current mechanism works for me quite fine for years, I had no reason to spend time to do it. |
Understood. But in this case HEX_ENCODE, HEX_DECODE and String Literals in Hex couldn't help? They are a hell of inefficient (in space terms), but they are available in all versions. Base64 would be much better, but it was added only to Firebird 4. I'll make some attempts in a few days. |
Well, those could probably help with binary BLOBs, but not with ARRAYs. I know that almost nobody uses them, but because driver supports them, there should be tests for them. These tests even helped to fix a regression in FB5 :) |
Nice!
If you are interested in this, I may get some days to work on it. I have some experience with pytest working on SQLAlchemy Firebird dialect. It's a fantastic tool. |
What about to use Firebird embedded to test this project?
I have already collected all needed files here (for Windows). I'm using it to test Firebird dialect of SQLAlchemy against versions 2.5 through 5.0 of Firebird.
Also, the db tests could be generated from scratch, instead of being commited to this repository.
If agreed I'm available to submit PRs.
The text was updated successfully, but these errors were encountered: