Claudiu Popa added the comment: os.chown is not available on Windows. But maybe pwd can't be built on any Unix system, so not using import_module is okay.
"=> I can not because assertRaisesRegex can not be used with "with" statement." Not true (see https://docs.python.org/3/library/unittest.html?highlight=assertraisesregex#unittest.TestCase.assertRaisesRegex). ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue20069> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com