Skip to content

Commit

Permalink
Skip test_module_utils_basic_ansible_module_creation on Python 3
Browse files Browse the repository at this point in the history
This reverts commit 073f10a and instead
disables the failing test.

We're focusing on Python 3 support on the controller first; modules will
come later.
  • Loading branch information
mgedmin committed Oct 14, 2015
1 parent 073f10a commit 225fe85
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 1 addition & 4 deletions lib/ansible/module_utils/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -1240,10 +1240,7 @@ def _set_defaults(self, pre=True):

def _load_params(self):
''' read the input and return a dictionary and the arguments string '''
params = json.loads(MODULE_COMPLEX_ARGS)
if str is bytes:
# Python 2
params = json_dict_unicode_to_bytes(params)
params = json_dict_unicode_to_bytes(json.loads(MODULE_COMPLEX_ARGS))
if params is None:
params = dict()
return params
Expand Down
4 changes: 3 additions & 1 deletion test/units/module_utils/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
__metaclass__ = type

import errno
import sys

from six.moves import builtins

Expand Down Expand Up @@ -220,7 +221,8 @@ def test_module_utils_basic_get_module_path(self):
from ansible.module_utils.basic import get_module_path
with patch('os.path.realpath', return_value='/path/to/foo/'):
self.assertEqual(get_module_path(), '/path/to/foo')


@unittest.skipIf(sys.version_info[0] >= 3, "Python 3 is not supported on targets (yet)")
def test_module_utils_basic_ansible_module_creation(self):
from ansible.module_utils import basic

Expand Down

0 comments on commit 225fe85

Please sign in to comment.