def METHOD_NAME(self):
    # Test that the file designated by [PJ]YTHONSTARTUP is executed when interactive.
    # Note: this test depends on the -i option forcing Python to treat stdin as interactive.
    filename = test.test_support.TESTFN
    self.addCleanup(test.test_support.unlink, filename)
    with open(filename, "w") as script:
        print >>script, "print 6*7"
        print >>script, "print 'Ni!'"
    expected = ['42', 'Ni!']
    def check(*args, **kwargs):
        result = assert_python_ok(*args, **kwargs)
        self.assertListEqual(expected, result[1].splitlines())
    if test.test_support.is_jython:
        # Jython produces a prompt before exit, but not CPython. Hard to say who is correct.
        expected.append('>>> ')
        # The Jython way is to set a registry item python.startup
        check('-i', '-J-Dpython.startup={}'.format(filename))
        # But a JYTHONSTARTUP environment variable is also supported
        check('-i', JYTHONSTARTUP=filename)
    else:
        check('-i', PYTHONSTARTUP=filename)