Skip to content

Commit

Permalink
Merge pull request #320 from jelly/unittest-mock
Browse files Browse the repository at this point in the history
Make the mock dependency optional
  • Loading branch information
ekalinin authored Mar 16, 2023
2 parents 08fa48b + de8dc7d commit edd1726
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

coverage
flake8
mock
mock; python_version < '3.3'
pytest
tox
tox
5 changes: 4 additions & 1 deletion tests/nodeenv_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
import sys
import sysconfig

import mock
try:
from unittest import mock
except ImportError:
import mock
import pytest

import nodeenv
Expand Down
5 changes: 4 additions & 1 deletion tests/test_install_activate.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import sys
import os

import mock
try:
from unittest import mock
except ImportError:
import mock
import pytest

import nodeenv
Expand Down

0 comments on commit edd1726

Please sign in to comment.