diff options
-rw-r--r-- | README.rst | 9 | ||||
-rw-r--r-- | osprofiler/cmd/commands.py | 3 | ||||
-rw-r--r-- | osprofiler/hacking/__init__.py (renamed from osprofiler/tests/hacking/__init__.py) | 0 | ||||
-rw-r--r-- | osprofiler/hacking/checks.py (renamed from osprofiler/tests/hacking/checks.py) | 0 | ||||
-rw-r--r-- | osprofiler/tests/cmd/test_shell.py | 5 | ||||
-rw-r--r-- | osprofiler/tests/drivers/test_redis_driver.py | 1 | ||||
-rw-r--r-- | tox.ini | 2 |
7 files changed, 15 insertions, 5 deletions
@@ -1,3 +1,12 @@ +======================== +Team and repository tags +======================== + +.. image:: http://governance.openstack.org/badges/osprofiler.svg + :target: http://governance.openstack.org/reference/tags/index.html + +.. Change things from this point on + =========================================================== OSProfiler -- Library for cross-project profiling library =========================================================== diff --git a/osprofiler/cmd/commands.py b/osprofiler/cmd/commands.py index 99be83e..876493b 100644 --- a/osprofiler/cmd/commands.py +++ b/osprofiler/cmd/commands.py @@ -76,7 +76,8 @@ class TraceCommands(BaseCommand): return obj if args.use_json: - output = json.dumps(trace, default=datetime_json_serialize) + output = json.dumps(trace, default=datetime_json_serialize, + indent=2) elif args.use_html: with open(os.path.join(os.path.dirname(__file__), "template.html")) as html_template: diff --git a/osprofiler/tests/hacking/__init__.py b/osprofiler/hacking/__init__.py index e69de29..e69de29 100644 --- a/osprofiler/tests/hacking/__init__.py +++ b/osprofiler/hacking/__init__.py diff --git a/osprofiler/tests/hacking/checks.py b/osprofiler/hacking/checks.py index 5b6e45d..5b6e45d 100644 --- a/osprofiler/tests/hacking/checks.py +++ b/osprofiler/hacking/checks.py diff --git a/osprofiler/tests/cmd/test_shell.py b/osprofiler/tests/cmd/test_shell.py index fa79c27..fc573ed 100644 --- a/osprofiler/tests/cmd/test_shell.py +++ b/osprofiler/tests/cmd/test_shell.py @@ -174,7 +174,7 @@ class ShellTestCase(test.TestCase): mock_get.return_value = notifications self.run_command("trace show fake_id --json") - self.assertEqual("%s\n" % json.dumps(notifications), + self.assertEqual("%s\n" % json.dumps(notifications, indent=2), sys.stdout.getvalue()) @mock.patch("sys.stdout", six.StringIO()) @@ -222,4 +222,5 @@ class ShellTestCase(test.TestCase): self.run_command("trace show fake_id --json --out='/file'") output = mock_open.return_value.__enter__.return_value - output.write.assert_called_once_with(json.dumps(notifications)) + output.write.assert_called_once_with(json.dumps(notifications, + indent=2)) diff --git a/osprofiler/tests/drivers/test_redis_driver.py b/osprofiler/tests/drivers/test_redis_driver.py index 9fbc2e8..8d22845 100644 --- a/osprofiler/tests/drivers/test_redis_driver.py +++ b/osprofiler/tests/drivers/test_redis_driver.py @@ -308,7 +308,6 @@ class RedisParserTestCase(test.TestCase): "wsgi": {"count": 3, "duration": 0}}} self.redisdb.db.scan_iter.return_value = list(results.keys()) - print(results.keys()) def side_effect(*args, **kwargs): return jsonutils.dumps(results[args[0]]) @@ -41,7 +41,7 @@ builtins = _ exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,tools,setup.py,build,releasenotes [hacking] -local-check-factory = osprofiler.tests.hacking.checks.factory +local-check-factory = osprofiler.hacking.checks.factory [testenv:releasenotes] commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html |