def METHOD_NAME(self, *patches):
    arch = patches[0]
    dev = PartitionDevice('req1', exists=False)
    arch.is_x86.return_value = False
    arch.is_efi.return_value = False
    arch.is_arm.return_value = False
    arch.is_ppc.return_value = False
    dev.req_base_weight = -7
    self.assertEqual(dev.weight, -7)
    dev.req_base_weight = None
    with patch.object(dev, "_format") as fmt:
        fmt.mountable = True
        # weights for / and /boot are not platform-specific (except for arm)
        fmt.mountpoint = "/"
        self.assertEqual(dev.weight, 0)
        fmt.mountpoint = "/boot"
        self.assertEqual(dev.weight, 2000)
        #
        # x86 (BIOS)
        #
        arch.is_x86.return_value = True
        arch.is_efi.return_value = False
        # user-specified weight should override other logic
        dev.req_base_weight = -7
        self.assertEqual(dev.weight, -7)
        dev.req_base_weight = None
        fmt.mountpoint = ""
        self.assertEqual(dev.weight, 0)
        fmt.type = "biosboot"
        self.assertEqual(dev.weight, 5000)
        fmt.mountpoint = "/boot/efi"
        fmt.type = "efi"
        self.assertEqual(dev.weight, 0)
        #
        # UEFI
        #
        arch.is_x86.return_value = False
        arch.is_efi.return_value = True
        self.assertEqual(dev.weight, 5000)
        fmt.type = "biosboot"
        self.assertEqual(dev.weight, 0)
        fmt.mountpoint = "/"
        self.assertEqual(dev.weight, 0)
        #
        # arm
        #
        arch.is_x86.return_value = False
        arch.is_efi.return_value = False
        arch.is_arm.return_value = True
        fmt.mountpoint = "/"
        self.assertEqual(dev.weight, -100)
        #
        # ppc
        #
        arch.is_arm.return_value = False
        arch.is_ppc.return_value = True
        arch.is_pmac.return_value = False
        arch.is_ipseries.return_value = False
        fmt.mountpoint = "/"
        self.assertEqual(dev.weight, 0)
        fmt.type = "prepboot"
        self.assertEqual(dev.weight, 0)
        fmt.type = "appleboot"
        self.assertEqual(dev.weight, 0)
        arch.is_pmac.return_value = True
        self.assertEqual(dev.weight, 5000)
        fmt.type = "prepboot"
        self.assertEqual(dev.weight, 0)
        arch.is_pmac.return_value = False
        arch.is_ipseries.return_value = True
        self.assertEqual(dev.weight, 5000)
        fmt.type = "appleboot"
        self.assertEqual(dev.weight, 0)
        fmt.mountpoint = "/boot/efi"
        fmt.type = "efi"
        self.assertEqual(dev.weight, 0)
        fmt.type = "biosboot"
        self.assertEqual(dev.weight, 0)
        fmt.mountpoint = "/"
        self.assertEqual(dev.weight, 0)
        fmt.mountpoint = "/boot"
        self.assertEqual(dev.weight, 2000)