Recent Releases of decoy

decoy - v2.1.1

Maintenance release to note official support for Python 3.12

- Python
Published by mcous over 2 years ago

decoy - v2.1.0

Features

  • spy: warn if mock used with a missing attribute (#218) (72cefe4), closes #204

- Python
Published by mcous over 2 years ago

decoy - v2.0.2

Bug Fixes

  • spy: ensure __eq__ of rehearsal arg is preferred (#201) (63413d8)

- Python
Published by mcous over 2 years ago

decoy - v2.0.1

Bug Fixes

  • warnings: trigger reset warnings at a better stack level (#165) (56863f5)

- Python
Published by mcous almost 3 years ago

decoy - v2.0.0

Refactors

  • require mock name, remove deprecated methods, drop Python 3.6 (#151) (1f4e9b3)

BREAKING CHANGES

  • if you do not specify a cls or func argument to decoy.mock(), you must specify a name parameter.

You can use the following find-and-replace patterns to fix most tests that start failing due to this change:

```

find

([a-z_]+?)(: .+?)? = decoy.mock()

replace

$1$2 = decoy.mock(name="$1") ```

```

find

([a-z]+?)(: .+?)? = decoy.mock(isasync=(.+?))

replace

$1$2 = decoy.mock(name="$1", is_async=$3) ```

- Python
Published by mcous about 3 years ago

decoy - v1.11.3

Bug Fixes

  • spy: prefix internal properties with _decoy (#150) (6a6868a), closes #144

- Python
Published by mcous about 3 years ago

decoy - v1.11.2

Bug Fixes

  • spy: use classmethod __func__ source for async detection (#148) (0dfc38c), closes #146

- Python
Published by mcous about 3 years ago

decoy - v1.11.1

Bug Fixes

  • spy: resolve source to origin of GenericAlias (#143) (7d021c2), closes #142

- Python
Published by mcous over 3 years ago

decoy - v1.11.0

Bug Fixes

Features

  • when: allow then_do to take an async function (4ae00e5), closes #136

- Python
Published by mcous over 3 years ago

decoy - v1.10.3

Bug Fixes

  • spy: follow __wrapped__ when getting specs and signatures (#134) (8d86195), closes #133

- Python
Published by mcous almost 4 years ago

decoy - v1.10.2

Bug Fixes

  • spy: handle properties that return primitive types (#132) (6eebc5a)
  • warnings: point to correct docs link in RedundantVerifyWarning (488eeec)

- Python
Published by mcous almost 4 years ago

decoy - v1.10.1

Bug Fixes

  • warnings: do not trigger MiscalledStubWarnings from prop events (#126) (396eae2), closes #125
  • when: fix type overloads of then_enter_with on mypy v0.941 (#124) (5db349b)

- Python
Published by mcous almost 4 years ago

decoy - v1.10.0

Bug Fixes

  • spy: ensure class signature uses __call__ (#120) (6a73b14)

Features

- Python
Published by mcous almost 4 years ago

decoy - v1.9.0

Features

  • when: add ContextManager mocking support (#93) (22bf2fb)

- Python
Published by mcous about 4 years ago

decoy - v1.8.0

Bug Fixes

  • matchers: use isinstance() for matchers.IsA rather than type() (#88) (be6c780)
  • fix name argument type anotation in Decoy.mock (1a59098)
  • matchers: ensure ErrorMatching return type matches spec (#86) (c60af56)

Features

  • allow spec-less mocks to be named (#85) (dbc4813), closes #79
  • match args leniently according to spec signature (#89) (fbbe941), closes #78

- Python
Published by mcous about 4 years ago

decoy - v1.7.0

Bug Fixes

  • verify: improve verify traceback and error messages (#66) (9e74b36)

Features

  • allow extra arguments to be ignored (#61) (d1ba0d3), closes #60

- Python
Published by mcous over 4 years ago

decoy - v1.6.7

Bug Fixes

  • verify: ensure verify with times respects rehearsal args (#57) (af39c43)

- Python
Published by mcous over 4 years ago

decoy - v1.6.6

Bug Fixes

  • call_stack: match spy IDs in getbyrehearsals (#55) (8845b5b), closes #54

- Python
Published by mcous over 4 years ago

decoy - v1.6.5

Bug Fixes

  • spy: match inspect.signature for staticmethods (#51) (f5dc60d)

- Python
Published by mcous over 4 years ago

decoy - v1.6.4

Bug Fixes

  • spy: gracefully degrade when a class's type hints can't be resolved at runtime (#47) (81072ed), closes #46

- Python
Published by mcous over 4 years ago

decoy - v1.6.3

Bug Fixes

  • verifier: do not access out-of-bounds index of calls list (#45) (15389ad), closes #44

- Python
Published by mcous over 4 years ago

decoy - v1.6.2

Bug Fixes

  • warnings: don't raise MiscalledStubWarning on verified calls (#42) (929df14), closes #41

- Python
Published by mcous over 4 years ago

decoy - v1.6.1

Bug Fixes

- Python
Published by mcous over 4 years ago

decoy - v1.6.0

Features

  • when: add then_do API for triggering a callback (#39) (01fb271), closes #31
  • add mock method to replace create_decoy, create_decoy_func (#37) (d3e0ae9)
  • spy: add inspect.signature and repr support (#35) (0b12237), closes #29 #30
  • warnings: add RedundantVerifyWarning (#36) (633159f), closes #34

- Python
Published by mcous over 4 years ago

decoy - v1.1.0

Features

- Python
Published by mcous over 4 years ago

decoy - v1.2.0

Bug Fixes

  • spy: allow spy creation when type hints cannot be resolved (#10) (6bd7f40), closes #8

Features

  • verify: allow multiple rehearsals in verify (#11) (0c4206e), closes #9

- Python
Published by mcous over 4 years ago

decoy - v1.3.0

Features

  • when: warn if stub is called with args that do not match (#15) (5fd4e6d), closes #14

- Python
Published by mcous over 4 years ago

decoy - v1.3.1

Reverts

  • remove missing stub warning; it's a little broken (338961e)

- Python
Published by mcous over 4 years ago

decoy - v1.3.2

Features

  • when: warn if stub is called with arguments that do not match rehearsals (#16) (f0190e7), closes #14

- Python
Published by mcous over 4 years ago

decoy - v1.4.0

Bug Fixes

  • typing: ensure create_decoy typing accepts ABC as spec (#20) (47e328c)

Features

  • matchers: add argument captor matcher (#19) (f8c49eb), closes #17
  • matchers: add HasAttributes and DictMatching matchers (#21) (0e75094), closes #18

- Python
Published by mcous over 4 years ago

decoy - v1.5.0

Features

  • pytest_plugin: add pytest plugin for decoy fixture injection (#26) (3193808), closes #25
  • verify: allow specification of exact call count (#27) (f17dd05), closes #23

- Python
Published by mcous over 4 years ago

decoy - v0.1.0

Features

- Python
Published by mcous over 4 years ago

decoy - v1.0.0

- Python
Published by mcous over 4 years ago

decoy - v1.0.1

Bug Fixes

  • allow nested mocks and typing (#2) (0371a77)

- Python
Published by mcous over 4 years ago

decoy - v1.0.2

Bug Fixes

  • replace unittest.mock usage with custom spy (#3) (d1b742d)

- Python
Published by mcous over 4 years ago