def METHOD_NAME(self):
    this = self
    class FakeNSIS(object):
        def __init__(self, version):
            self.version = version
        def __call__(self, stdin, args):
            this.assertEqual(args, ("-version",))
            return 0, self.version, ""
    def check_nsis_version(version):
        sandbox = self.get_sandbox(
            {"/usr/bin/makensis": FakeNSIS(version)},
            {},
            ["--target=x86_64-pc-windows-msvc", "--disable-bootstrap"],
            {"PATH": "/usr/bin", "MAKENSISU": "/usr/bin/makensis"},
        )
        return sandbox._value_for(sandbox["nsis_version"])
    with self.assertRaises(SystemExit):
        check_nsis_version("v2.5")
    with self.assertRaises(SystemExit):
        check_nsis_version("v3.0a2")
    self.assertEqual(check_nsis_version("v3.0b1"), "3.0b1")
    self.assertEqual(check_nsis_version("v3.0b2"), "3.0b2")
    self.assertEqual(check_nsis_version("v3.0rc1"), "3.0rc1")
    self.assertEqual(check_nsis_version("v3.0"), "3.0")
    self.assertEqual(check_nsis_version("v3.0-2"), "3.0")
    self.assertEqual(check_nsis_version("v3.0.1"), "3.0")
    self.assertEqual(check_nsis_version("v3.1"), "3.1")