upstash / redis-py

HTTP based Python Redis Client for Serverless and Edge Functions
https://docs.upstash.com/redis
MIT License
29 stars 3 forks source link

tests #6

Closed chronark closed 1 year ago

chronark commented 1 year ago

The current test suite is not enough. There are lots of commands which we don't have even a single test for. And, in my local environment, most of the tests are failing. We should fix this, and improve the test suite.

chronark commented 1 year ago

yes, we will add tests before releasing as GA

TudorZgimbau commented 1 year ago

All of the tests in the 3.10-compatible branch are passing. I assume there was a misconfiguration at the time of writing the comment, or the prepare_database script was not run before.

Edit: I'm also thinking of a possible desync when testing on a distributed database. But it might not be the case if the original comment said

most of the tests are failing

mdumandag commented 1 year ago

Yes, I was testing the code in the main branch.

Oh, OK, that solves the problem :) But, I think it would be better if we prepare the database for the tests in their before hooks/fixtures so that I can run tests more than once without running prepare_data script in between.

TudorZgimbau commented 1 year ago

Yeah, there are probably better ways to do it. I'm not an expert on testing and I didn't mind having two terminals open and re-running the same commands :)

chronark commented 1 year ago

Not a blocker for the launch, let's optimize this later