diff options
author | Marc Koderer <m.koderer@telekom.de> | 2014-05-26 08:09:37 +0200 |
---|---|---|
committer | Marc Koderer <m.koderer@telekom.de> | 2014-07-03 08:21:52 +0200 |
commit | 289d1dab8d3afa88451571ba8fe35e9b3f1aff51 (patch) | |
tree | 6253e02bb95a3147bc98a377525f79537488761b | |
parent | db9eb80fdbe96c4f98ec00d85c06435f89ea28a1 (diff) | |
download | oslotest-289d1dab8d3afa88451571ba8fe35e9b3f1aff51.tar.gz |
Add known issue about time.time mocking
Since the log level may change by setting the environment variable
OS_DEBUG a hint is added into the base class.
Change-Id: I351e2c59fe75c14dba398cb734a9648650c26074
Closes-bug: 1320841
-rw-r--r-- | oslotest/base.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/oslotest/base.py b/oslotest/base.py index f9c4b92..c1cad3d 100644 --- a/oslotest/base.py +++ b/oslotest/base.py @@ -57,6 +57,15 @@ class BaseTestCase(testtools.TestCase): change the ``HOME`` environment variable to point to a temporary location. + PLEASE NOTE: + Usage of this class may change the log level globally by setting the + environment variable ``OS_DEBUG``. A mock of ``time.time`` will be called + many more times than might be expected because it's called often by the + logging module. A usage of such a mock should be avoided when a test needs + to verify logging behavior or counts the number of invocations. A + workaround is to overload the ``_fake_logs`` function in a base class but + this will deactivate fake logging globally. + .. _fixtures: https://pypi.python.org/pypi/fixtures """ |