pysimplesql icon indicating copy to clipboard operation
pysimplesql copied to clipboard

Unit testing

Open PySimpleSQL opened this issue 2 years ago • 5 comments

As we get closer to moving to code cleanup, I'd like to start adding some unit tests.

I would prefer to use pytest rather than unittest.

PySimpleSQL avatar Apr 13 '23 02:04 PySimpleSQL

Yes, I'd love this. I've never created a test-suite before.

If you create a few, I'll start helping out.

ssweber avatar Apr 13 '23 04:04 ssweber

I think in the long run, any push or merge into master should have a hook to run all unit tests. I'm not sure if we need that level of protection for development, but it's definitely open for discussion

The SQLDriver unit tests will be a monster by the time they are done, including spooling up of docker. I would imagine these tests will end up taking over a minute or so by the time they are done

PySimpleSQL avatar Apr 13 '23 08:04 PySimpleSQL

It'll be a huge improvement from current by-hand testing all the different database examples via forms.

To test dependent handling we'll probably want a testing database/form/docker images that has dependents. Do you have a preference on a sample database? Create our own, or use use Northwind, AdventureWorks, Chinook?

ssweber avatar Apr 13 '23 14:04 ssweber

It really doesn't matter to meet too much. Docker is probably the easiest since we already have everything in place to use them.

On Thu, Apr 13, 2023, 10:14 AM ssweber @.***> wrote:

It'll be a huge improvement from current by-hand testing all the different database examples via forms.

To test dependent handling we'll probably want a testing database/form/docker images that has dependents. Do you have a preference on a sample database? Create our own, or use use Northwind, AdventureWorks, Chinook?

— Reply to this email directly, view it on GitHub https://github.com/PySimpleSQL/pysimplesql/issues/278#issuecomment-1507048107, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQX2REVQZO44LMLZ3HWXRPTXBAC5XANCNFSM6AAAAAAW4N3FEQ . You are receiving this because you authored the thread.Message ID: @.***>

PySimpleSQL avatar Apr 13 '23 15:04 PySimpleSQL

We should eventually build a frontend for the Northwind database, since it's such a popular a familiar example

On Thu, Apr 13, 2023, 11:01 AM Jon Decker @.***> wrote:

It really doesn't matter to meet too much. Docker is probably the easiest since we already have everything in place to use them.

On Thu, Apr 13, 2023, 10:14 AM ssweber @.***> wrote:

It'll be a huge improvement from current by-hand testing all the different database examples via forms.

To test dependent handling we'll probably want a testing database/form/docker images that has dependents. Do you have a preference on a sample database? Create our own, or use use Northwind, AdventureWorks, Chinook?

— Reply to this email directly, view it on GitHub https://github.com/PySimpleSQL/pysimplesql/issues/278#issuecomment-1507048107, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQX2REVQZO44LMLZ3HWXRPTXBAC5XANCNFSM6AAAAAAW4N3FEQ . You are receiving this because you authored the thread.Message ID: @.***>

PySimpleSQL avatar Apr 13 '23 15:04 PySimpleSQL