Skip to content
This repository has been archived by the owner on Oct 8, 2024. It is now read-only.

Error: get error in testing #14

Open
danghai opened this issue Jun 19, 2018 · 4 comments
Open

Error: get error in testing #14

danghai opened this issue Jun 19, 2018 · 4 comments

Comments

@danghai
Copy link

danghai commented Jun 19, 2018

I got error in testing after command: python3 -m unittest discover

danghai@ubuntu:~/test/gif-for-cli$ python3 -m unittest discover

..................................EE..........
======================================================================
ERROR: tests.test_export (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: tests.test_export
Traceback (most recent call last):
  File "/usr/lib/python3.5/unittest/loader.py", line 428, in _find_test_path
    module = self._get_module_from_name(name)
  File "/usr/lib/python3.5/unittest/loader.py", line 369, in _get_module_from_name
    __import__(name)
  File "/home/danghai/test/gif-for-cli/tests/test_export.py", line 22, in <module>
    from gif_for_cli.export import _export_txt_frames, _get_txt_frames, _run_ffmpeg, export, export_txt_frame
  File "/home/danghai/test/gif-for-cli/gif_for_cli/export.py", line 23, in <module>
    from . import third_party
ImportError: cannot import name 'third_party'


======================================================================
ERROR: tests.test_main (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: tests.test_main
Traceback (most recent call last):
  File "/usr/lib/python3.5/unittest/loader.py", line 428, in _find_test_path
    module = self._get_module_from_name(name)
  File "/usr/lib/python3.5/unittest/loader.py", line 369, in _get_module_from_name
    __import__(name)
  File "/home/danghai/test/gif-for-cli/tests/test_main.py", line 21, in <module>
    from gif_for_cli.__main__ import execute
  File "/home/danghai/test/gif-for-cli/gif_for_cli/__main__.py", line 25, in <module>
    from .export import export
  File "/home/danghai/test/gif-for-cli/gif_for_cli/export.py", line 23, in <module>
    from . import third_party
ImportError: cannot import name 'third_party'


----------------------------------------------------------------------
Ran 46 tests in 0.035s

FAILED (errors=2)
@SeanHayes
Copy link
Contributor

Since this was first written there have been some changes to the code that require setup.py to be run. Does python3 setup.py test work for you?

@danghai
Copy link
Author

danghai commented Jul 17, 2018

yeah python3 setup.py test works for me

@diego-rapoport
Copy link

I had the same problem with the third_party import. Couldn't figure it out yet.

@7-Leaf
Copy link

7-Leaf commented Aug 30, 2022

I had the same problem with the third_party import. Couldn't figure it out yet.

rm gif_for_cli/third_party 
cp third_party gif_for_cli/third_party  -r

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants