Closed opoplawski closed 9 years ago
Getting the following failures:
+ py.test-2.7 -v ipython_genutils/tests/ ============================= test session starts ============================== platform linux2 -- Python 2.7.10 -- py-1.4.29 -- pytest-2.7.2 -- /usr/bin/python2 rootdir: /builddir/build/BUILD/ipython_genutils-0.1.0, inifile: collecting ... collected 17 items ipython_genutils/tests/test_importstring.py::test_import_plain PASSED ipython_genutils/tests/test_importstring.py::test_import_nested PASSED ipython_genutils/tests/test_importstring.py::test_import_raises PASSED ipython_genutils/tests/test_path.py::test_filefind PASSED ipython_genutils/tests/test_path.py::test_ensure_dir_exists FAILED ipython_genutils/tests/test_path.py::TestLinkOrCopy::test_link_successful FAILED ipython_genutils/tests/test_path.py::TestLinkOrCopy::test_link_into_dir FAILED ipython_genutils/tests/test_path.py::TestLinkOrCopy::test_target_exists FAILED ipython_genutils/tests/test_path.py::TestLinkOrCopy::test_no_link FAILED ipython_genutils/tests/test_path.py::TestLinkOrCopy::test_windows SKIPPED ipython_genutils/tests/test_path.py::TestLinkOrCopy::test_link_twice FAILED ipython_genutils/tests/test_tempdir.py::test_named_file_in_temporary_directory PASSED ipython_genutils/tests/test_tempdir.py::test_temporary_working_directory PASSED ipython_genutils/tests/test_text.py::test_columnize PASSED ipython_genutils/tests/test_text.py::test_columnize_random PASSED ipython_genutils/tests/test_text.py::test_columnize_medium PASSED ipython_genutils/tests/test_text.py::test_columnize_long PASSED =================================== FAILURES =================================== ____________________________ test_ensure_dir_exists ____________________________ def test_ensure_dir_exists(): with TemporaryDirectory() as td: d = os.path.join(td, u'∂ir') > path.ensure_dir_exists(d) # create it ipython_genutils/tests/test_path.py:27: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ipython_genutils/path.py:165: in ensure_dir_exists if not os.path.exists(path): _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ path = '/tmp/tmpu1R53C/\u2202ir' def exists(path): """Test whether a path exists. Returns False for broken symbolic links""" try: > os.stat(path) E UnicodeEncodeError: 'ascii' codec can't encode character u'\u2202' in position 15: ordinal not in range(128) /usr/lib64/python2.7/genericpath.py:26: UnicodeEncodeError _____________________ TestLinkOrCopy.test_link_successful ______________________ args = (<ipython_genutils.tests.test_path.TestLinkOrCopy object at 0x7fe54b42e2d0>,) kwargs = {} def skipper_func(*args, **kwargs): """Skipper for normal test functions.""" if skip_val(): raise nose.SkipTest(get_msg(f,msg)) else: > return f(*args, **kwargs) ipython_genutils/testing/decorators.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ipython_genutils/tests/test_path.py:64: in test_link_successful dst = self.dst("target") _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <ipython_genutils.tests.test_path.TestLinkOrCopy object at 0x7fe54b42e2d0> args = ('target',) def dst(self, *args): > return os.path.join(self.tempdir.name, *args) E AttributeError: 'TestLinkOrCopy' object has no attribute 'tempdir' ipython_genutils/tests/test_path.py:47: AttributeError ______________________ TestLinkOrCopy.test_link_into_dir _______________________ args = (<ipython_genutils.tests.test_path.TestLinkOrCopy object at 0x7fe54b473c10>,) kwargs = {} def skipper_func(*args, **kwargs): """Skipper for normal test functions.""" if skip_val(): raise nose.SkipTest(get_msg(f,msg)) else: > return f(*args, **kwargs) ipython_genutils/testing/decorators.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ipython_genutils/tests/test_path.py:70: in test_link_into_dir dst = self.dst("some_dir") _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <ipython_genutils.tests.test_path.TestLinkOrCopy object at 0x7fe54b473c10> args = ('some_dir',) def dst(self, *args): > return os.path.join(self.tempdir.name, *args) E AttributeError: 'TestLinkOrCopy' object has no attribute 'tempdir' ipython_genutils/tests/test_path.py:47: AttributeError ______________________ TestLinkOrCopy.test_target_exists _______________________ args = (<ipython_genutils.tests.test_path.TestLinkOrCopy object at 0x7fe54b429090>,) kwargs = {} def skipper_func(*args, **kwargs): """Skipper for normal test functions.""" if skip_val(): raise nose.SkipTest(get_msg(f,msg)) else: > return f(*args, **kwargs) ipython_genutils/testing/decorators.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ipython_genutils/tests/test_path.py:78: in test_target_exists dst = self.dst("target") _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <ipython_genutils.tests.test_path.TestLinkOrCopy object at 0x7fe54b429090> args = ('target',) def dst(self, *args): > return os.path.join(self.tempdir.name, *args) E AttributeError: 'TestLinkOrCopy' object has no attribute 'tempdir' ipython_genutils/tests/test_path.py:47: AttributeError _________________________ TestLinkOrCopy.test_no_link __________________________ args = (<ipython_genutils.tests.test_path.TestLinkOrCopy object at 0x7fe54b42e390>,) kwargs = {} def skipper_func(*args, **kwargs): """Skipper for normal test functions.""" if skip_val(): raise nose.SkipTest(get_msg(f,msg)) else: > return f(*args, **kwargs) ipython_genutils/testing/decorators.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ipython_genutils/tests/test_path.py:88: in test_no_link dst = self.dst("target") _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <ipython_genutils.tests.test_path.TestLinkOrCopy object at 0x7fe54b42e390> args = ('target',) def dst(self, *args): > return os.path.join(self.tempdir.name, *args) E AttributeError: 'TestLinkOrCopy' object has no attribute 'tempdir' ipython_genutils/tests/test_path.py:47: AttributeError ________________________ TestLinkOrCopy.test_link_twice ________________________ self = <ipython_genutils.tests.test_path.TestLinkOrCopy object at 0x7fe54b3d1190> def test_link_twice(self): # Linking the same file twice shouldn't leave duplicates around. # See https://github.com/ipython/ipython/issues/6450 > dst = self.dst('target') ipython_genutils/tests/test_path.py:104: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <ipython_genutils.tests.test_path.TestLinkOrCopy object at 0x7fe54b3d1190> args = ('target',) def dst(self, *args): > return os.path.join(self.tempdir.name, *args) E AttributeError: 'TestLinkOrCopy' object has no attribute 'tempdir' ipython_genutils/tests/test_path.py:47: AttributeError ================ 6 failed, 10 passed, 1 skipped in 0.13 seconds ================
@opoplawski this package uses nose for tests. Do the tests pass if you run
nosetests ipython_genutils
?
Ah, yes, that works fine. Thanks.
Getting the following failures: