Giter VIP home page Giter VIP logo

Comments (11)

GoogleCodeExporter avatar GoogleCodeExporter commented on June 28, 2024
What would mock do as a class decorator?

Original comment by fuzzyman on 10 Jun 2010 at 9:55

from mock.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 28, 2024
it would wrap every test method in a testcase

Original comment by [email protected] on 10 Jun 2010 at 11:09

from mock.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 28, 2024
Wrap every test method in a testcase? Eh? (In unittest all test methods become 
separate TestCase instances anyway.) What does that have to do with mock?

Do you mean patch as a class decorator, automatically wrapping a patch 
decorator round every test method instead of having to decorate them separately?

Original comment by fuzzyman on 10 Jun 2010 at 11:18

from mock.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 28, 2024

Original comment by fuzzyman on 10 Jun 2010 at 11:19

  • Added labels: Type-Enhancement
  • Removed labels: Type-Defect

from mock.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 28, 2024
> Do you mean patch as a class decorator, automatically wrapping a patch 
decorator round every test method instead of having to decorate them separately?

Exactly :)

Original comment by [email protected] on 10 Jun 2010 at 11:22

from mock.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 28, 2024
Right - so given your comment on issue 30 I think what you mean is to allow 
patch to work as a class decorator; the equivalent of patching every test 
method. That sounds like a good feature. Again, I would be open to patches 
(with tests and docs).

Want to help me maintain mock? There are lots of open issues here you could 
comment on...

Original comment by fuzzyman on 10 Jun 2010 at 11:24

from mock.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 28, 2024
Sure, I'll get to it this evening.

Original comment by [email protected] on 10 Jun 2010 at 11:57

from mock.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 28, 2024

Original comment by fuzzyman on 12 Jun 2010 at 10:58

  • Changed state: Accepted

from mock.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 28, 2024
Test methods are unfortunately identified by the TestLoader.testMethodPrefix 
attribute. That means from a TestCase class you can't *tell* which methods will 
later be used as tests. 

For initial implementation we could recognise test methods as ones that start 
with 'test'. Maybe consider making it configurable as a feature request for 
future releases.

Original comment by fuzzyman on 12 Jun 2010 at 11:03

from mock.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 28, 2024

Original comment by fuzzyman on 12 Jun 2010 at 11:22

from mock.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 28, 2024

Original comment by [email protected] on 12 Jun 2010 at 12:49

  • Changed state: Fixed

from mock.

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.