This repository was archived by the owner on Feb 26, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnotes.txt
More file actions
44 lines (26 loc) · 1.21 KB
/
Copy pathnotes.txt
File metadata and controls
44 lines (26 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Testing openstack services
-----
tox -v -epy27
tox list-env
grep envlist tox.ini # see all the env
tox -v -epy27 --notest # create env with not running tests
tox -v -r -epy27 # force recreate env
tox -v -r -epy27 --notest # force recreate env without running tests
tox -v -epy27 -- test_name_regex
source .tox/env/py27/bin/activate
testr list-tests # list all tests
testr run -- -f # run till first failing test
python -m testtools.run <test> # for debugging
UT
--
Importing particular project in python interpreter:
----
Set the python path
export PYTHONPATH=$PYTHONPATH:/opt/stack/heat
Now python interpreter has path to heat.
All directories underlying /opt/stack/heat will be visible now.
For e.g.: /opt/stack/heat/heat/common/context.py can be imported by:
>>> import heat.common.context as ctx
>>> dir(ctx)
['ContextMiddleware', 'ContextMiddleware_filter_factory', 'LOG', 'RequestContext', '_LE', '__builtins__', '__doc__', '__file__', '__name__', '__package__', 'access', 'access_plugin', 'cfg', 'clients', 'context', 'db_api', 'exception', 'get_admin_context', 'importutils', 'logging', 'oslo_messaging', 'oslo_request_id', 'policy', 'request_context', 'six', 'token_endpoint', 'v3', 'wsgi']
>>>