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

Add Jinja2 to tests_require #1167

Closed
koobs opened this Issue Jul 28, 2014 · 1 comment

Comments

Projects
None yet
2 participants
@koobs

koobs commented Jul 28, 2014

Add Jinja2 to tests_require, as the test suite currently outputs the following when run without Jinja2 installed:

test_contrib.TestContrib.test_upload_template_handles_jinja_template
upload_template() should work OK with Jinja2 template ...
Fatal error: Traceback (most recent call last):
  File "fabric/contrib/files.py", line 129, in upload_template
    from jinja2 import Environment, FileSystemLoader
ImportError: No module named jinja2

Unable to import Jinja2 -- see above.

Aborting.
ERROR
test_contrib.TestContrib.test_upload_template_jinja_and_no_template_dir ...
Fatal error: Traceback (most recent call last):
  File "fabric/contrib/files.py", line 129, in upload_template
    from jinja2 import Environment, FileSystemLoader
ImportError: No module named jinja2

Unable to import Jinja2 -- see above.

Aborting.
ERROR

<snip>

======================================================================
ERROR: test_contrib.TestContrib.test_upload_template_handles_jinja_template
upload_template() should work OK with Jinja2 template
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/mnt/home/user/repos/freebsd/ports/devel/py-fabric/work/Fabric-1.9.0/nose-1.3.3-py2.7.egg/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/mnt/home/user/repos/freebsd/ports/devel/py-fabric/work/Fabric-1.9.0/tests/server.py", line 478, in inner
    return func(*args, **kwargs)
  File "/mnt/home/user/repos/freebsd/ports/devel/py-fabric/work/Fabric-1.9.0/tests/test_contrib.py", line 69, in test_upload_template_handles_jinja_template
    use_jinja=True, template_dir=template_dir)
  File "fabric/contrib/files.py", line 139, in upload_template
    abort(tb + "\nUnable to import Jinja2 -- see above.")
  File "fabric/utils.py", line 34, in abort
    sys.exit(1)
SystemExit: 1

<snip>

======================================================================
ERROR: test_contrib.TestContrib.test_upload_template_jinja_and_no_template_dir
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/mnt/home/user/repos/freebsd/ports/devel/py-fabric/work/Fabric-1.9.0/nose-1.3.3-py2.7.egg/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/mnt/home/user/repos/freebsd/ports/devel/py-fabric/work/Fabric-1.9.0/tests/server.py", line 478, in inner
    return func(*args, **kwargs)
  File "/mnt/home/user/repos/freebsd/ports/devel/py-fabric/work/Fabric-1.9.0/tests/test_contrib.py", line 81, in test_upload_template_jinja_and_no_template_dir
    upload_template(fname, '/configfile.txt', {}, use_jinja=True)
  File "fabric/contrib/files.py", line 139, in upload_template
    abort(tb + "\nUnable to import Jinja2 -- see above.")
  File "fabric/utils.py", line 34, in abort
    sys.exit(1)
SystemExit: 1

<snip>

Ran 380 tests in 245.368s - FAILED (errors=2)
@bitprophet

This comment has been minimized.

Member

bitprophet commented Aug 5, 2014

Thanks, I think those tests were added or manipulated recently and the contributor probably overlooked setup.py.

@bitprophet bitprophet closed this in 60c0fc2 Aug 5, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment