Drop direct execution of os_refresh_config.py
Now we generate the console script using setuptools, and we don't expect users may directly execute the *.py file. Change-Id: I6fb802d0dee7e47f9fd619afba2f379f881914af
This commit is contained in:
parent
d01c391c51
commit
d262d5e60e
5
os_refresh_config/os_refresh_config.py
Executable file → Normal file
5
os_refresh_config/os_refresh_config.py
Executable file → Normal file
@ -1,4 +1,3 @@
|
||||
#!/usr/bin/env python3
|
||||
# Copyright 2013 Hewlett-Packard Development Company, L.P.
|
||||
# All Rights Reserved.
|
||||
#
|
||||
@ -159,7 +158,3 @@ def main(argv=sys.argv):
|
||||
log.debug('No dir for phase %s' % phase)
|
||||
|
||||
return exit(lock)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main(sys.argv))
|
||||
|
@ -17,16 +17,11 @@ import time
|
||||
import fixtures
|
||||
import testtools
|
||||
|
||||
script_path = os.path.join(
|
||||
os.path.dirname(os.path.realpath(__file__)),
|
||||
'../os_refresh_config.py')
|
||||
|
||||
|
||||
class TestCmd(testtools.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(TestCmd, self).setUp()
|
||||
self.assertTrue(os.path.exists(script_path))
|
||||
self.useFixture(fixtures.NestedTempfile())
|
||||
self.base_dir = self.useFixture(fixtures.TempDir())
|
||||
self.lockdir = self.useFixture(fixtures.TempDir())
|
||||
@ -49,7 +44,7 @@ class TestCmd(testtools.TestCase):
|
||||
'PATH': os.environ.get('PATH')
|
||||
}
|
||||
cmd_args = [
|
||||
script_path,
|
||||
'os-refresh-config',
|
||||
'--lockfile', self.lockfile
|
||||
]
|
||||
if args:
|
||||
|
2
tox.ini
2
tox.ini
@ -1,6 +1,5 @@
|
||||
[tox]
|
||||
minversion = 3.1.0
|
||||
skipsdist = True
|
||||
envlist = py3,pep8
|
||||
skip_missing_interpreters = true
|
||||
# this allows tox to infer the base python from the environment name
|
||||
@ -14,7 +13,6 @@ deps =
|
||||
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
||||
-r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
install_command = pip install {opts} {packages}
|
||||
commands =
|
||||
stestr run --slowest {posargs}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user