Merge ~smoser/cloud-init:bug/silence-cheetah-userwarning into cloud-init:master

Proposed by Scott Moser
Status: Merged
Merged at revision: 76b13884beda10bf293b0abe8ebe2955986878e1
Proposed branch: ~smoser/cloud-init:bug/silence-cheetah-userwarning
Merge into: cloud-init:master
Diff against target: 14 lines (+9/-0)
1 file modified
tests/unittests/__init__.py (+9/-0)
Reviewer Review Type Date Requested Status
Joshua Harlow (community) Approve
Review via email: mp+307333@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Scott Moser (smoser) wrote :

This is what i don't like:

$ tox-venv py27 nosetests tests/unittests/
...................SSSSS............................................................................................................................................................................................................................................................................................................................................................../home/smoser-public/src/cloud-init/cloud-init/.tox/py27/local/lib/python2.7/site-packages/Cheetah/Compiler.py:1509: UserWarning:
You don't have the C version of NameMapper installed! I'm disabling Cheetah's useStackFrames option as it is painfully slow with the Python version of NameMapper. You should get a copy of Cheetah with the compiled C version of NameMapper.
  "\nYou don't have the C version of NameMapper installed! "
......................................................................................................................................................................................................................................................................................................................................................................................
----------------------------------------------------------------------
Ran 748 tests in 3.240s

OK (SKIP=5)

Revision history for this message
Joshua Harlow (harlowja) :
review: Approve

There was an error fetching revisions from git servers. Please try again in a few minutes. If the problem persists, contact Launchpad support.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/tests/unittests/__init__.py b/tests/unittests/__init__.py
2index e69de29..1b34b5a 100644
3--- a/tests/unittests/__init__.py
4+++ b/tests/unittests/__init__.py
5@@ -0,0 +1,9 @@
6+try:
7+ # For test cases, avoid the following UserWarning to stderr:
8+ # You don't have the C version of NameMapper installed ...
9+ from Cheetah import NameMapper as _nm
10+ _nm.C_VERSION = True
11+except ImportError:
12+ pass
13+
14+# vi: ts=4 expandtab

Subscribers

People subscribed via source and target branches