GithubHelp home page GithubHelp logo

Comments (2)

deathowl avatar deathowl commented on May 21, 2024

Will do this soon, thanks for the report @Piojo :)

from testslide.

fornellas avatar fornellas commented on May 21, 2024

@Piojo I believe all 3 cases should raise an exception if a call is made:

self.mock_callable(foo, 'bar')
self.mock_callable(foo, 'bar').and_assert_not_called()
self.mock_callable(foo, 'bar').to_return_value(None).and_assert_not_called()

sot "they work equally". Though:

  • The exception from self.mock_callable(foo, 'bar') sohuld be generic such as "no behaviour defined for this call".
  • And for the others, the exception should be "unexpected call received".
    So... "kinda" the same, though not really :-P

No harm in adding self.mock_callable(foo, 'bar').and_assert_not_called() shortcut though :-D

from testslide.

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.