def setUpClass(cls): # setUpClass is executed despite the whole class being skipped if CASSANDRA_VERSION >= "3.10": cls.db_klass, cls.python_klass = (Duration, util.Duration) cls.first_value, cls.second_value, cls.third_value = ( util.Duration(0, 0, 0), util.Duration(1, 2, 3), util.Duration(0, 0, 0)) super(TestDuration, cls).setUpClass()
def deserialize(byts, protocol_version): months, days, nanoseconds = vints_unpack(byts) return util.Duration(months, days, nanoseconds)