01-fix-tests.patch 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. --- contrib/python/pytest-mock/py2/tests/test_pytest_mock.py (index)
  2. +++ contrib/python/pytest-mock/py2/tests/test_pytest_mock.py (working tree)
  3. @@ -387,6 +387,7 @@ def test_static_method_subclass_spy(mocker):
  4. assert spy.spy_return == 20
  5. +@pytest.mark.skip("Skip testdir")
  6. def test_callable_like_spy(testdir, mocker):
  7. testdir.makepyfile(
  8. uut="""
  9. @@ -494,6 +495,7 @@ def test_assert_called_wrapper(mocker):
  10. stub.assert_called()
  11. +@pytest.mark.skip
  12. @pytest.mark.usefixtures("needs_assert_rewrite")
  13. def test_assert_called_args_with_introspection(mocker):
  14. stub = mocker.stub()
  15. @@ -510,6 +512,7 @@ def test_assert_called_args_with_introspection(mocker):
  16. stub.assert_called_once_with(*wrong_args)
  17. +@pytest.mark.skip
  18. @pytest.mark.usefixtures("needs_assert_rewrite")
  19. def test_assert_called_kwargs_with_introspection(mocker):
  20. stub = mocker.stub()
  21. @@ -543,6 +546,7 @@ def test_assert_has_calls(mocker):
  22. stub.assert_has_calls([mocker.call("bar")])
  23. +@pytest.mark.skip("Skip testdir")
  24. def test_monkeypatch_ini(mocker, testdir):
  25. # Make sure the following function actually tests something
  26. stub = mocker.stub()
  27. @@ -590,6 +594,7 @@ def test_patched_method_parameter_name(mocker):
  28. m.assert_called_once_with(method="get", args={"type": "application/json"})
  29. +@pytest.mark.skip("Skip testdir")
  30. def test_monkeypatch_native(testdir):
  31. """Automatically disable monkeypatching when --tb=native.
  32. """
  33. @@ -615,6 +620,7 @@ def test_monkeypatch_native(testdir):
  34. ) # make sure there are no duplicated tracebacks (#44)
  35. +@pytest.mark.skip("Skip testdir")
  36. def test_monkeypatch_no_terminal(testdir):
  37. """Don't crash without 'terminal' plugin.
  38. """
  39. @@ -631,6 +637,7 @@ def test_monkeypatch_no_terminal(testdir):
  40. assert result.stdout.lines == []
  41. +@pytest.mark.skip("Skip testdir")
  42. @pytest.mark.skipif(sys.version_info[0] < 3, reason="Py3 only")
  43. def test_standalone_mock(testdir):
  44. """Check that the "mock_use_standalone" is being used.
  45. @@ -661,6 +668,7 @@ def runpytest_subprocess(testdir, *args):
  46. return testdir.runpytest(*args)
  47. +@pytest.mark.skip("Skip testdir")
  48. @pytest.mark.usefixtures("needs_assert_rewrite")
  49. def test_detailed_introspection(testdir):
  50. """Check that the "mock_use_standalone" is being used.
  51. @@ -700,6 +708,7 @@ def test_detailed_introspection(testdir):
  52. result.stdout.fnmatch_lines(expected_lines)
  53. +@pytest.mark.skip("Skip testdir")
  54. def test_missing_introspection(testdir):
  55. testdir.makepyfile(
  56. """
  57. @@ -723,6 +732,7 @@ def test_assert_called_with_unicode_arguments(mocker):
  58. stub.assert_called_with(u"lak")
  59. +@pytest.mark.skip("Skip testdir")
  60. def test_plain_stopall(testdir):
  61. """patch.stopall() in a test should not cause an error during unconfigure (#137)"""
  62. testdir.makepyfile(
  63. @@ -776,6 +786,7 @@ def test_abort_patch_context_manager(mocker):
  64. assert str(excinfo.value) == expected_error_msg
  65. +@pytest.mark.skip("Skip testdir")
  66. def test_abort_patch_context_manager_with_stale_pyc(testdir):
  67. """Ensure we don't trigger an error in case the frame where mocker.patch is being
  68. used doesn't have a 'context' (#169)"""