Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests fail on Python 3.4 #109

Closed
emillon opened this issue Mar 26, 2014 · 2 comments
Closed

Tests fail on Python 3.4 #109

emillon opened this issue Mar 26, 2014 · 2 comments

Comments

@emillon
Copy link

emillon commented Mar 26, 2014

Hi,

The tests fails on python 3.4. It's hard to determine if it's guessit's fault or babelfish's, but I think that the new doctest module (see here and this bug) triggers an infinite loop.

 % python3.4 setup.py test
running test
running egg_info
writing dependency_links to guessit.egg-info/dependency_links.txt
writing entry points to guessit.egg-info/entry_points.txt
writing requirements to guessit.egg-info/requires.txt
writing top-level names to guessit.egg-info/top_level.txt
writing guessit.egg-info/PKG-INFO
reading manifest file 'guessit.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'guessit.egg-info/SOURCES.txt'
running build_ext
Traceback (most recent call last):
  File "setup.py", line 83, in <module>
    setup(**args)
  File "/usr/lib/python3.4/distutils/core.py", line 149, in setup
    dist.run_commands()
  File "/usr/lib/python3.4/distutils/dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.4/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/usr/lib/python3/dist-packages/setuptools/command/test.py", line 138, in run
    self.with_project_on_sys_path(self.run_tests)
  File "/usr/lib/python3/dist-packages/setuptools/command/test.py", line 118, in with_project_on_sys_path
    func()
  File "/usr/lib/python3/dist-packages/setuptools/command/test.py", line 164, in run_tests
    testLoader = cks
  File "/usr/lib/python3.4/unittest/main.py", line 92, in __init__
    self.parseArgs(argv)
  File "/usr/lib/python3.4/unittest/main.py", line 139, in parseArgs
    self.createTests()
  File "/usr/lib/python3.4/unittest/main.py", line 146, in createTests
    self.module)
  File "/usr/lib/python3.4/unittest/loader.py", line 146, in loadTestsFromNames
    suites = [self.loadTestsFromName(name, module) for name in names]
  File "/usr/lib/python3.4/unittest/loader.py", line 146, in <listcomp>
    suites = [self.loadTestsFromName(name, module) for name in names]
  File "/usr/lib/python3.4/unittest/loader.py", line 117, in loadTestsFromName
    return self.loadTestsFromModule(obj)
  File "/usr/lib/python3/dist-packages/setuptools/command/test.py", line 35, in loadTestsFromModule
    tests.append(self.loadTestsFromName(submodule))
  File "/usr/lib/python3.4/unittest/loader.py", line 105, in loadTestsFromName
    module = __import__('.'.join(parts_copy))
  File "/home/etienne/debian/svn/build-area/guessit-0.7.1/guessit/test/__main__.py", line 22, in <module>
    from guessit.test import (test_api, test_autodetect, test_autodetect_all, test_doctests,
  File "/home/etienne/debian/svn/build-area/guessit-0.7.1/guessit/test/test_doctests.py", line 42, in <module>
    load_tests(None, suite, None)
  File "/home/etienne/debian/svn/build-area/guessit-0.7.1/guessit/test/test_doctests.py", line 36, in load_tests
    tests.addTests(doctest.DocTestSuite(guessit.language))
  File "/usr/lib/python3.4/doctest.py", line 2372, in DocTestSuite
    tests = test_finder.find(module, globs=globs, extraglobs=extraglobs)
  File "/usr/lib/python3.4/doctest.py", line 928, in find
    self._find(tests, obj, name, module, source_lines, globs, {})
  File "/usr/lib/python3.4/doctest.py", line 987, in _find
    if ((inspect.isroutine(val) or inspect.isclass(val)) and
  File "/usr/lib/python3.4/inspect.py", line 258, in isroutine
    or ismethoddescriptor(object))
  File "/usr/lib/python3.4/inspect.py", line 113, in ismethoddescriptor
    return hasattr(tp, "__get__") and not hasattr(tp, "__set__")
  File "/usr/lib/python3/dist-packages/babelfish/language.py", line 55, in __getattr__
    return getattr(cls, name)
[...]
  File "/usr/lib/python3/dist-packages/babelfish/language.py", line 55, in __getattr__
    return getattr(cls, name)
RuntimeError: maximum recursion depth exceeded while calling a Python object
@Toilal
Copy link
Member

Toilal commented Mar 26, 2014

That was a bug in babelfish, now fixed in babelfish master. I'm waiting for @Diaoul OK to perform a release of babelfish, with this fix and memory optimization.

It's not related to doctest bug you've mentioned.

@Toilal Toilal closed this as completed Mar 26, 2014
@emillon
Copy link
Author

emillon commented Mar 26, 2014

Great, thanks.

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

No branches or pull requests

2 participants