Skip to content

ImportError: Import by filename is not supported. #751

Closed
@brussee

Description

@brussee

While running nose that uses python unittest builtin library.

Error log:

I/python: AND: Ran string
I/python: Run user program, change dir and execute entrypoint
I/Triblerd: Traceback (most recent call last):
I/Triblerd:   File "Triblerd.py", line 33, in <module>
I/Triblerd:     Triblerd().test()
I/Triblerd:   File "Triblerd.py", line 29, in test
I/Triblerd:     nose.run('-s ' + test_path)
I/Triblerd:   File "/data/user/0/org.tribler.android/files/lib/python2.7/site-packages/nose/core.py", line 301, in run
I/Triblerd:     return TestProgram(*arg, **kw).success
I/Triblerd:   File "/data/user/0/org.tribler.android/files/lib/python2.7/site-packages/nose/core.py", line 121, in __init__
I/Triblerd:     **extra_args)
I/Triblerd:   File "/data/user/0/org.tribler.android/files/lib/python27.zip/unittest/main.py", line 77, in __init__
I/Triblerd: ImportError: Import by filename is not supported.
I/python: Python for android ended.

main.py source:
def __init__(self, module='__main__', defaultTest=None, argv=None,
                testRunner=None, testLoader=loader.defaultTestLoader,
                exit=True, verbosity=1, failfast=None, catchbreak=None,
                buffer=None):
    if isinstance(module, basestring):
        self.module = __import__(module)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions