diff options
author | Ross Burton <ross.burton@intel.com> | 2017-03-01 12:17:27 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-03-01 16:11:40 +0000 |
commit | 6ecd671fb09486b5852c47f06b5db372a2eb082b (patch) | |
tree | 00570e6ff424f869049641d2bc3314565ac5a846 /meta/lib/oeqa | |
parent | 7606f05e48ad2e31650e3a56bfcd04b4fbfad1e3 (diff) | |
download | openembedded-core-6ecd671fb09486b5852c47f06b5db372a2eb082b.tar.gz openembedded-core-6ecd671fb09486b5852c47f06b5db372a2eb082b.tar.bz2 openembedded-core-6ecd671fb09486b5852c47f06b5db372a2eb082b.zip |
oeqa/esdk/devtool: clean setUpClass/tearDownClass
These methods are class not instance methods, so the argument should be cls not
self.
Also don't put variables into cls that we don't need there.
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa')
-rw-r--r-- | meta/lib/oeqa/sdkext/cases/devtool.py | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/meta/lib/oeqa/sdkext/cases/devtool.py b/meta/lib/oeqa/sdkext/cases/devtool.py index baa528f0d7..ffaa2f00a5 100644 --- a/meta/lib/oeqa/sdkext/cases/devtool.py +++ b/meta/lib/oeqa/sdkext/cases/devtool.py @@ -11,14 +11,19 @@ from oeqa.core.decorator.data import skipIfNotDataVar class DevtoolTest(OESDKExtTestCase): @classmethod - def setUpClass(self): - self.myapp_src = os.path.join(self.tc.esdk_files_dir, "myapp") - self.myapp_dst = os.path.join(self.tc.sdk_dir, "myapp") - shutil.copytree(self.myapp_src, self.myapp_dst) + def setUpClass(cls): + myapp_src = os.path.join(cls.tc.esdk_files_dir, "myapp") + cls.myapp_dst = os.path.join(cls.tc.sdk_dir, "myapp") + shutil.copytree(myapp_src, cls.myapp_dst) - self.myapp_cmake_src = os.path.join(self.tc.esdk_files_dir, "myapp_cmake") - self.myapp_cmake_dst = os.path.join(self.tc.sdk_dir, "myapp_cmake") - shutil.copytree(self.myapp_cmake_src, self.myapp_cmake_dst) + myapp_cmake_src = os.path.join(cls.tc.esdk_files_dir, "myapp_cmake") + cls.myapp_cmake_dst = os.path.join(cls.tc.sdk_dir, "myapp_cmake") + shutil.copytree(myapp_cmake_src, cls.myapp_cmake_dst) + + @classmethod + def tearDownClass(cls): + shutil.rmtree(cls.myapp_dst) + shutil.rmtree(cls.myapp_cmake_dst) def _test_devtool_build(self, directory): self._run('devtool add myapp %s' % directory) @@ -111,8 +116,3 @@ class DevtoolTest(OESDKExtTestCase): self._run('devtool reset %s' % package_nodejs) raise e self._run('devtool reset %s '% package_nodejs) - - @classmethod - def tearDownClass(self): - shutil.rmtree(self.myapp_dst) - shutil.rmtree(self.myapp_cmake_dst) |