Giter Club home page Giter Club logo

Comments (4)

yarikoptic avatar yarikoptic commented on August 24, 2024

another manifestation reported by @mvdoc:
https://travis-ci.org/duecredit/duecredit/jobs/75193538

======================================================================
ERROR: duecredit.tests.test_injections.test_no_double_activation
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/travis/build/duecredit/duecredit/duecredit/tests/test_injections.py", line 142, in test_no_double_activation
    injector.activate()
  File "/home/travis/build/duecredit/duecredit/duecredit/injections/injector.py", line 219, in activate
    raise RuntimeError("__import__ is already duecredited")
RuntimeError: __import__ is already duecredited
-------------------- >> begin captured logging << --------------------
duecredit: WARNING: _orig_import is not yet known, so we haven't decorated default importer yet. Nothing TODO
--------------------- >> end captured logging << ---------------------

from duecredit.

yarikoptic avatar yarikoptic commented on August 24, 2024

I think it is Python bug somewhere... not sure where or how, but I do not see how

    print("Assigned4: %s" % DueCreditInjector._orig_import)
    globs = glob(ptrn)
    print("Assigned5: %s" % DueCreditInjector._orig_import)

could result in

Assigned4: <built-in function __import__>
Assigned5: None

from duecredit.

yarikoptic avatar yarikoptic commented on August 24, 2024

btw, "bug" goes away also if there is more output, e.g. running nosetests with -v or dumping output at higher DUECREDIT_LOGLEVEL.

from duecredit.

yarikoptic avatar yarikoptic commented on August 24, 2024

it is so much more fun! e.g. if I remove .pyc files -- we work fine, but then would fail on the next run:

2 11919.....................................:Wed 12 Aug 2015 06:48:30 PM EDT:.
(git)hopa:~/proj/duecredit[pr-41]git
$> find -iname *pyc -delete
2 11920.....................................:Wed 12 Aug 2015 06:48:46 PM EDT:.
(git)hopa:~/proj/duecredit[pr-41]git
$> .tox/py27/bin/nosetests -s duecredit
.......2015-08-12 18:48:49,620 [ERROR  ] Just use nosetests duecredit for now (NotImplementedError) (main.py:178)
.....................SS.......2015-08-12 18:48:49,633 [WARNING] Seems that we are calling duecredit_importer twice. No harm is done but shouldn't happen (injector.py:280)
...2015-08-12 18:48:49,635 [WARNING] _orig_import is not yet known, so we haven't decorated default importer yet. Nothing TODO (injector.py:330)
.........SSSSSSSS
----------------------------------------------------------------------
Ran 57 tests in 0.088s

OK (SKIP=10)
2 11921.....................................:Wed 12 Aug 2015 06:48:49 PM EDT:.
(git)hopa:~/proj/duecredit[pr-41]git
$> .tox/py27/bin/nosetests -s duecredit
.......2015-08-12 18:48:51,144 [ERROR  ] Just use nosetests duecredit for now (NotImplementedError) (main.py:178)
.....................SS..2015-08-12 18:48:51,156 [ERROR  ] For some reason self._orig_import is None. Importing using stock importer to mitigate (injector.py:253)
2015-08-12 18:48:51,156 [ERROR  ] For some reason self._orig_import is None. Importing using stock importer to mitigate (injector.py:253)
Traceback (most recent call last):
  File ".tox/py27/bin/nosetests", line 11, in <module>
    sys.exit(run_exit())
  File "/home/yoh/proj/duecredit/.tox/py27/local/lib/python2.7/site-packages/nose/core.py", line 121, in __init__
    **extra_args)
  File "/usr/lib/python2.7/unittest/main.py", line 95, in __init__
    self.runTests()
  File "/home/yoh/proj/duecredit/.tox/py27/local/lib/python2.7/site-packages/nose/core.py", line 207, in runTests
    result = self.testRunner.run(self.test)
  File "/home/yoh/proj/duecredit/.tox/py27/local/lib/python2.7/site-packages/nose/core.py", line 62, in run
    test(result)
  File "/home/yoh/proj/duecredit/.tox/py27/local/lib/python2.7/site-packages/nose/suite.py", line 177, in __call__

from duecredit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.