toabctl / metaextract

get metadata for python modules
Apache License 2.0
7 stars 4 forks source link

Unit tests failing #9

Closed toddrme2178 closed 5 years ago

toddrme2178 commented 5 years ago

The unit tests are currently failing on Python 3.x. This can be seen in the travis builds:

=================================== FAILURES ===================================

_______________ TestMetaExtract.test__extract_to_tempdir_no_file _______________

self = <metaextract.tests.test_metaextract.TestMetaExtract object at 0x7f52c27e7710>

    def test__extract_to_tempdir_no_file(self):

        with pytest.raises(Exception) as e_info:

            with meta_utils._extract_to_tempdir("foobar"):

                pass

>       assert "foobar" in str(e_info)

E       AssertionError: assert 'foobar' in '<ExceptionInfo Exception tblen=3>'

E        +  where '<ExceptionInfo Exception tblen=3>' = str(<ExceptionInfo Exception tblen=3>)

metaextract/tests/test_metaextract.py:76: AssertionError

_______________________ TestMetaExtract.test_no_setup_py _______________________

self = <metaextract.tests.test_metaextract.TestMetaExtract object at 0x7f52c27a2a20>

tmpdir = local('/tmp/pytest-of-travis/pytest-0/test_no_setup_py0')

    def test_no_setup_py(self, tmpdir):

        with pytest.raises(Exception) as e_info:

            meta_utils._setup_py_run_from_dir(tmpdir.strpath, sys.executable)

>       assert tmpdir.strpath in str(e_info)

E       AssertionError: assert '/tmp/pytest-of-travis/pytest-0/test_no_setup_py0' in '<ExceptionInfo Exception tblen=2>'

E        +  where '/tmp/pytest-of-travis/pytest-0/test_no_setup_py0' = local('/tmp/pytest-of-travis/pytest-0/test_no_setup_py0').strpath

E        +  and   '<ExceptionInfo Exception tblen=2>' = str(<ExceptionInfo Exception tblen=2>)

metaextract/tests/test_metaextract.py:142: AssertionError

===================== 2 failed, 14 passed in 2.09 seconds ======================