[VOL-2282]
Run robot tests with Python 3
- Remove HTTP and database robot libraries that aren't used
- Make robot lint treat warnings as errors
- Reformat robot tests to pass lint, and other minor fixes
- Lint/reformat of python code
- Add yaml and json linting
- Clean up Makefile
- Assume the KUBECONFIG and VOLTCONFIG env vars are defined
Change-Id: Ibf0a6b525802ed907efc38b34c8e3b99b2044bf1
diff --git a/libraries/DependencyLibrary.py b/libraries/DependencyLibrary.py
index 9d402af..15c1dbc 100644
--- a/libraries/DependencyLibrary.py
+++ b/libraries/DependencyLibrary.py
@@ -11,9 +11,12 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-#
+
+from __future__ import absolute_import
+
from robot.libraries.BuiltIn import BuiltIn
+
class DependencyLibrary(object):
ROBOT_LISTENER_API_VERSION = 2
ROBOT_LIBRARY_SCOPE = "GLOBAL"
@@ -24,10 +27,10 @@
def require_test_case(self, name):
key = name.lower()
- if (key not in self.test_status):
+ if key not in self.test_status:
BuiltIn().fail("required test case can't be found: '%s'" % name)
- if (self.test_status[key] != "PASS"):
+ if self.test_status[key] != "PASS":
BuiltIn().fail("required test case failed: '%s'" % name)
return True