def test_zset(self):
        zset_1 = {
            'a': 30,
            'b': 20,
            'c': 100,
            'd': 1,
            'e': 64,
            'f': -3,
            'g': 0
        }
        self.client.zclear('zset_1')
        self.client.delete('zset_1')
        a = self.client.multi_zset('zset_1', **zset_1)
        assert_equals(a, len(zset_1))
        b = self.client.zcount('zset_1', 20, 70)
        assert_equals(b, 3)
        c = self.client.zcount('zset_1', 0, 100)
        assert_equals(c, 6)
        d = self.client.zcount('zset_1', 2, 3)
        assert_equals(d, 0)

        b = self.client.zsum('zset_1', 20, 70)
        assert_equals(b, 114)
        c = self.client.zsum('zset_1', 0, 100)
        assert_equals(c, 215)
        d = self.client.zsum('zset_1', 2, 3)
        assert_equals(d, 0)

        b = self.client.zavg('zset_1', 20, 70)
        assert_equals(b, 38.0)
        c = self.client.zavg('zset_1', 0, 100)
        assert_equals(round(abs(c-6/215.0),4),0)
        d = self.client.zavg('zset_1', 2, 3)
        assert_true(math.isnan(float('nan')))

        b = self.client.zremrangebyrank('zset_1', 0, 2)
        assert_equals(b, 3)
        b = self.client.zremrangebyrank('zset_1', 1, 2)
        assert_equals(b, 2)

        a = self.client.multi_zset('zset_1', **zset_1)
        b = self.client.zremrangebyscore('zset_1', 20, 70)
        assert_equals(b, 3)
        b = self.client.zremrangebyscore('zset_1', 0, 100)
        assert_equals(b, 3)
                        
        self.client.zclear('zset_1')
        self.client.delete('zset_1')
dataset/ETHPy150Open wrongwaycn/ssdb-py/tests/test_client.py/TestClient.test_zset/swapped operands of `/`