Giter Club home page Giter Club logo

Comments (8)

cunla avatar cunla commented on August 16, 2024

Are there more commands like that or only this one?

from fakeredis-py.

cunla avatar cunla commented on August 16, 2024

Not sure how you got it to work with real redis - The method signature is:

def srem(self, name: str, *values: FieldT) -> Union[Awaitable[int], int]:

so running the command you propose does not work on redis-py and therefore does not work on FakeRedis

from fakeredis-py.

klausmyrseth avatar klausmyrseth commented on August 16, 2024

No you have to send string by string, my mistake, I have a unit test now that works on my side for my case. Ill update my sample.

We only met srem as an issue, havent dug hard into the other commands.

from fakeredis-py.

cunla avatar cunla commented on August 16, 2024

please send the test that does not work

from fakeredis-py.

klausmyrseth avatar klausmyrseth commented on August 16, 2024

def test_fail():
from fakeredis import FakeRedis
r = FakeRedis()
r.srem(name='somekey', values='one')

from fakeredis-py.

cunla avatar cunla commented on August 16, 2024

Did you try it with real redis-py?
It fails on real redis-py as well with the same error...

from fakeredis-py.

klausmyrseth avatar klausmyrseth commented on August 16, 2024

I located the source of the bug on my side, its most likely in my venv I was using not the libraries or some editor cache in the venv....

Sorry to bug everyone, for some reason it showed different signatures when using the classes directly and that crashed in my unit tests when I used this. I recreated a clean venv with only the usecase and the two libs redis and fakeredis and now the signatures are similar and it works as expected. I will try find what is messing up my environment without bugging you guys :)

from fakeredis-py.

cunla avatar cunla commented on August 16, 2024

No problem @klausmyrseth. Happy to help.

from fakeredis-py.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.