Ideally running the unit tests shouldn't affect the user's home directory.
Currently they create ~/.glanceclient and some files under that directory
$ rm -fr /mnt/sam/.glanceclient/
devstack-kilo-stable:sam in /mnt/sam/git/python-glanceclient on master*
$ tox -epy27
py27 develop-inst-nodeps: /mnt/sam/git/python-glanceclient
py27 installed: Babel==2.0,cffi==1.2.1,coverage==3.7.1,cryptography==1.0,debtcollector==0.7.0,discover==0.4.0,docutils==0.12,ecdsa==0.13,enum34==1.0.4,extras==0.0.3,fixtures==1.3.1,flake8==2.2.4,funcsigs==0.4,functools32==3.2.3.post2,hacking==0.10.2,httplib2==0.9.1,idna==2.0,ipaddress==1.0.14,iso8601==0.1.10,Jinja2==2.8,jsonpatch==1.11,jsonpointer==1.9,jsonschema==2.5.1,linecache2==1.0.0,MarkupSafe==0.23,mccabe==0.2.1,mock==1.3.0,monotonic==0.3,msgpack-python==0.4.6,netaddr==0.7.17,netifaces==0.10.4,os-testr==0.3.0,oslo.config==2.3.0,oslo.context==0.5.0,oslo.i18n==2.5.0,oslo.log==1.10.0,oslo.serialization==1.8.0,oslo.utils==2.4.0,oslosphinx==3.1.0,paramiko==1.15.2,pbr==1.6.0,pep8==1.5.7,prettytable==0.7.2,pyasn1==0.1.8,pycparser==2.14,pycrypto==2.6.1,pyflakes==0.8.1,Pygments==2.0.2,pyOpenSSL==0.15.1,-e git+https://review.openstack.org/openstack/python-glanceclient@17375a422c44641dd459bbde9473e126d874ab82#egg=python_glanceclient-master,python-keystoneclient==1.6.0,python-mimeparse==0.1.4,python-subunit==1.1.0,pytz==2015.4,requests==2.7.0,requests-mock==0.6.0,six==1.9.0,Sphinx==1.2.3,stevedore==1.7.0,tempest-lib==0.7.0,testrepository==0.0.20,testscenarios==0.5.0,testtools==1.8.0,traceback2==1.4.0,unittest2==1.1.0,warlock==1.1.0,wheel==0.24.0,wrapt==1.10.5
py27 runtests: PYTHONHASHSEED='0'
py27 runtests: commands[0] | python setup.py testr --testr-args=
running testr
running=${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./glanceclient/tests/unit} --list
running=${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./glanceclient/tests/unit} --load-list /tmp/tmpDtDZOW
running=${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./glanceclient/tests/unit} --load-list /tmp/tmplebsht
running=${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./glanceclient/tests/unit} --load-list /tmp/tmp0qSWLO
running=${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./glanceclient/tests/unit} --load-list /tmp/tmpLhY8DL
Invalid API version parameter. Supported values are [1, 2]
Invalid API version parameter. Supported values are [1, 2]
... terminating glance client
Invalid API version parameter. Supported values are [1, 2]
Invalid API version parameter. Supported values are [1, 2]
/mnt/sam/git/python-glanceclient/.tox/py27/local/lib/python2.7/site-packages/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
... terminating glance client
/mnt/sam/git/python-glanceclient/.tox/py27/local/lib/python2.7/site-packages/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Unable to upload image data to an image which is active.
No metadata definition namespace passed via stdin or --file argument.
Schema is not a valid JSON object.
Schema is not a valid JSON object.
Schema is not a valid JSON object.
Schema is not a valid JSON object.
Schema is not a valid JSON object.
Property MyProperty not found in object MyObject.
Ran 442 tests in 4.223s (+2.807s)
PASSED (id=169, skips=1)
______________________________________________________________ summary ______________________________________________________________
py27: commands succeeded
congratulations :)
$ find /mnt/sam/.glanceclient/
/mnt/sam/.glanceclient/
/mnt/sam/.glanceclient/5f8ca8b1c967597e3026933579b30b51670c8d20
/mnt/sam/.glanceclient/5f8ca8b1c967597e3026933579b30b51670c8d20/namespace_schema.json
/mnt/sam/.glanceclient/5f8ca8b1c967597e3026933579b30b51670c8d20/resource_type_schema.json
/mnt/sam/.glanceclient/5f8ca8b1c967597e3026933579b30b51670c8d20/image_schema.json
/mnt/sam/.glanceclient/279af8f8df83a3fd4d619497b6e5e7d695495c77
/mnt/sam/.glanceclient/279af8f8df83a3fd4d619497b6e5e7d695495c77/namespace_schema.json
/mnt/sam/.glanceclient/279af8f8df83a3fd4d619497b6e5e7d695495c77/resource_type_schema.json
/mnt/sam/.glanceclient/279af8f8df83a3fd4d619497b6e5e7d695495c77/image_schema.json
/mnt/sam/.glanceclient/6acf19ef13c3f0cbc216b2dc6ebcbc3a49329d72
/mnt/sam/.glanceclient/02871e782587606cf2a2a3ddf98fb4432b46c676
Fix proposed to branch: master /review. openstack. org/221239
Review: https:/