This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author arcivanov
Recipients BTaskaya, arcivanov, vstinner
Date 2020-07-02.13:49:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1593697763.24.0.887041997377.issue41194@roundup.psfhosted.org>
In-reply-to
Content
My guess is that the issue is related to the sys.modules manipulation, i.e. these parts of the integration test harness:

    def smoke_test(self, *args):
        old_argv = list(sys.argv)
        del sys.argv[:]
        sys.argv.append(self.build_py)
        sys.argv.extend(args)

        old_modules = dict(sys.modules)
        old_meta_path = list(sys.meta_path)
        old_cwd = getcwd()
        chdir(self.tmp_directory)
        try:
            return run_path(self.build_py, run_name="__main__")
        except SystemExit as e:
            self.assertEqual(e.code, 0, "Test did not exit successfully")
        finally:
            del sys.argv[:]
            sys.argv.extend(old_argv)

            sys.modules.clear()
            sys.modules.update(old_modules)

            del sys.meta_path[:]
            sys.meta_path.extend(old_meta_path)
            chdir(old_cwd)

    def smoke_test_module(self, module, *args):
        old_argv = list(sys.argv)
        del sys.argv[:]
        sys.argv.append("bogus")
        sys.argv.extend(args)

        old_modules = dict(sys.modules)
        old_meta_path = list(sys.meta_path)
        old_cwd = getcwd()
        chdir(self.tmp_directory)
        try:
            return run_module(module, run_name="__main__")
        except SystemExit as e:
            self.assertEqual(e.code, 0, "Test did not exit successfully")
        finally:
            del sys.argv[:]
            sys.argv.extend(old_argv)

            sys.modules.clear()
            sys.modules.update(old_modules)

            del sys.meta_path[:]
            sys.meta_path.extend(old_meta_path)
            chdir(old_cwd)
History
Date User Action Args
2020-07-02 13:49:23arcivanovsetrecipients: + arcivanov, vstinner, BTaskaya
2020-07-02 13:49:23arcivanovsetmessageid: <1593697763.24.0.887041997377.issue41194@roundup.psfhosted.org>
2020-07-02 13:49:23arcivanovlinkissue41194 messages
2020-07-02 13:49:23arcivanovcreate