Skip to content

Commit

Permalink
tests: use unittest.mock when available
Browse files Browse the repository at this point in the history
Python3 includes unittest.mock so the third-party mock is not strictly
required when using python3.

Closes git-cola#569
Suggested-by: Ilya Tumaykin <itumaykin@gmail.com>
Signed-off-by: David Aguilar <davvid@gmail.com>
  • Loading branch information
davvid committed May 3, 2016
1 parent cb9bd22 commit 33a468a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
1 change: 1 addition & 0 deletions share/doc/git-cola/relnotes.rst
Expand Up @@ -6,6 +6,7 @@ Releases
:titlesonly:

relnotes/unreleased
relnotes/v2.7
relnotes/v2.6
relnotes/v2.5
relnotes/v2.4
Expand Down
12 changes: 12 additions & 0 deletions share/doc/git-cola/relnotes/v2.7.rst
@@ -0,0 +1,12 @@
.. _v2.7:

git-cola v2.7 (pre-release)
===========================

Development
-----------

* The `unittest.mock` module is now used instead of the original `mock` module
when running the `git cola` test suite using Python3.

https://github.com/git-cola/git-cola/issues/569
5 changes: 4 additions & 1 deletion test/git_test.py
Expand Up @@ -8,7 +8,10 @@
import time
import unittest

from mock import patch
try:
from unittest.mock import patch
except ImportError:
from mock import patch

from cola import git
from cola.compat import WIN32
Expand Down

0 comments on commit 33a468a

Please sign in to comment.