|
@@ 511-522 (lines=12) @@
|
| 508 |
|
assert replay.unexpected == "" |
| 509 |
|
|
| 510 |
|
|
| 511 |
|
def test_story_full_play_proxy(): |
| 512 |
|
with Story(test_mod) as story: |
| 513 |
|
test_mod.target(123) == 'foobar' |
| 514 |
|
test_mod.target(1234) ** ValueError |
| 515 |
|
|
| 516 |
|
with story.replay(recurse_lock=True, proxy=True, strict=False) as replay: |
| 517 |
|
assert test_mod.target() is None |
| 518 |
|
assert test_mod.target(123) == 'foobar' |
| 519 |
|
raises(ValueError, test_mod.target, 1234) |
| 520 |
|
raises(TypeError, test_mod.target, 'asdf') |
| 521 |
|
|
| 522 |
|
assert replay.unexpected == format_calls(OrderedDict([ |
| 523 |
|
((None, 'test_pkg1.test_pkg2.test_mod.target', '', ''), _Returns("None")), |
| 524 |
|
((None, 'test_pkg1.test_pkg2.test_mod.target', "'asdf'", ''), _Raises(repr_ex(TypeError( |
| 525 |
|
'target() takes no arguments (1 given)' |
|
@@ 498-508 (lines=11) @@
|
| 495 |
|
assert replay.unexpected == "" |
| 496 |
|
|
| 497 |
|
|
| 498 |
|
def test_story_full_play_noproxy_dump(): |
| 499 |
|
with Story(test_mod) as story: |
| 500 |
|
test_mod.target(123) == 'foobar' |
| 501 |
|
test_mod.target(1234) ** ValueError |
| 502 |
|
|
| 503 |
|
with story.replay(recurse_lock=True, proxy=False, strict=False, dump=True) as replay: |
| 504 |
|
raises(AssertionError, test_mod.target) |
| 505 |
|
assert test_mod.target(123) == 'foobar' |
| 506 |
|
raises(ValueError, test_mod.target, 1234) |
| 507 |
|
|
| 508 |
|
assert replay.unexpected == "" |
| 509 |
|
|
| 510 |
|
|
| 511 |
|
def test_story_full_play_proxy(): |
|
@@ 485-495 (lines=11) @@
|
| 482 |
|
])) |
| 483 |
|
|
| 484 |
|
|
| 485 |
|
def test_story_full_play_noproxy(): |
| 486 |
|
with Story(test_mod) as story: |
| 487 |
|
test_mod.target(123) == 'foobar' |
| 488 |
|
test_mod.target(1234) ** ValueError |
| 489 |
|
|
| 490 |
|
with story.replay(recurse_lock=True, proxy=False, strict=False, dump=False) as replay: |
| 491 |
|
raises(AssertionError, test_mod.target) |
| 492 |
|
assert test_mod.target(123) == 'foobar' |
| 493 |
|
raises(ValueError, test_mod.target, 1234) |
| 494 |
|
|
| 495 |
|
assert replay.unexpected == "" |
| 496 |
|
|
| 497 |
|
|
| 498 |
|
def test_story_full_play_noproxy_dump(): |