X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=test%2Fcsit%2Flibraries%2FHsfJson%2Fhsfl.py;fp=test%2Fcsit%2Flibraries%2FHsfJson%2Fhsfl.py;h=0000000000000000000000000000000000000000;hb=59e81c38620fa1b61e15771191e35771450b9499;hp=99e70a41b1fc831d4a8ff391138bf5a2f1276852;hpb=072f6e3a8d1bdf8f4c663843589c22d93ba07791;p=integration%2Ftest.git diff --git a/test/csit/libraries/HsfJson/hsfl.py b/test/csit/libraries/HsfJson/hsfl.py deleted file mode 100644 index 99e70a41b1..0000000000 --- a/test/csit/libraries/HsfJson/hsfl.py +++ /dev/null @@ -1,36 +0,0 @@ -"""This module contains single class, to store a sorted list.""" -# Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved. -# -# This program and the accompanying materials are made available under the -# terms of the Eclipse Public License v1.0 which accompanies this distribution, -# and is available at http://www.eclipse.org/legal/epl-v10.html - -__author__ = "Vratko Polak" -__copyright__ = "Copyright(c) 2015, Cisco Systems, Inc." -__license__ = "Eclipse Public License v1.0" -__email__ = "vrpolak@cisco.com" - - -class Hsfl(list): - """ - Hashable sorted frozen list implementation stub. - - Supports only __init__, __repr__ and __hash__ methods. - Other list methods are available, but they may break contract. - """ - - def __init__(self, *args, **kwargs): - """Contruct super, sort and compute repr and hash cache values.""" - sup = super(Hsfl, self) - sup.__init__(*args, **kwargs) - sup.sort(key=repr) - self.__repr = repr(tuple(self)) - self.__hash = hash(self.__repr) - - def __repr__(self): - """Return cached repr string.""" - return self.__repr - - def __hash__(self): - """Return cached hash.""" - return self.__hash