PATH: //opt/alt/python311/lib64/python3.11/test
FILE_BARU
CREATE
FOLDER_BARU
MKDIR
UPLOAD_FILE
GO
[ .. KEMBALI ]
π Sine-1000Hz-300ms.aif
β
X
π __init__.py
β
X
π __main__.py
β
X
π __pycache__/
X
π _test_atexit.py
β
X
π _test_eintr.py
β
X
π _test_embed_set_config.py
β
X
π _test_embed_structseq.py
β
X
π _test_multiprocessing.py
β
X
π _test_venv_multiprocessing.py
β
X
π archiver_tests.py
β
X
π audiodata/
X
π audiotest.au
β
X
π audiotests.py
β
X
π audit-tests.py
β
X
π autotest.py
β
X
π bisect_cmd.py
β
X
π certdata/
X
π cjkencodings/
X
π clinic.test.c
β
X
π cmath_testcases.txt
β
X
π configdata/
X
π crashers/
X
π curses_tests.py
β
X
π data/
X
π datetimetester.py
β
X
π decimaltestdata/
X
π dis_module.py
β
X
π dtracedata/
X
π empty.vbs
β
X
π encoded_modules/
X
π exception_hierarchy.txt
β
X
π floating_points.txt
β
X
π fork_wait.py
β
X
π formatfloat_testcases.txt
β
X
π ieee754.txt
β
X
π imghdrdata/
X
π imp_dummy.py
β
X
π leakers/
X
π libregrtest/
X
π list_tests.py
β
X
π lock_tests.py
β
X
π mailcap.txt
β
X
π mapping_tests.py
β
X
π math_testcases.txt
β
X
π memory_watchdog.py
β
X
π mime.types
β
X
π mock_socket.py
β
X
π mp_fork_bomb.py
β
X
π mp_preload.py
β
X
π multibytecodec_support.py
β
X
π pickletester.py
β
X
π profilee.py
β
X
π pstats.pck
β
X
π pyclbr_input.py
β
X
π pythoninfo.py
β
X
π randv2_32.pck
β
X
π randv2_64.pck
β
X
π randv3.pck
β
X
π re_tests.py
β
X
π recursion.tar
β
X
π regrtest.py
β
X
π regrtestdata/
X
π relimport.py
β
X
π reperf.py
β
X
π seq_tests.py
β
X
π signalinterproctester.py
β
X
π sndhdrdata/
X
π ssl_servers.py
β
X
π ssltests.py
β
X
π string_tests.py
β
X
π subprocessdata/
X
π support/
X
π test___all__.py
β
X
π test__locale.py
β
X
π test__opcode.py
β
X
π test__osx_support.py
β
X
π test__xxsubinterpreters.py
β
X
π test_abc.py
β
X
π test_abstract_numbers.py
β
X
π test_aifc.py
β
X
π test_argparse.py
β
X
π test_array.py
β
X
π test_asdl_parser.py
β
X
π test_ast.py
β
X
π test_asyncgen.py
β
X
π test_asynchat.py
β
X
π test_asyncio/
X
π test_asyncore.py
β
X
π test_atexit.py
β
X
π test_audioop.py
β
X
π test_audit.py
β
X
π test_augassign.py
β
X
π test_base64.py
β
X
π test_baseexception.py
β
X
π test_bdb.py
β
X
π test_bigaddrspace.py
β
X
π test_bigmem.py
β
X
π test_binascii.py
β
X
π test_binop.py
β
X
π test_bisect.py
β
X
π test_bool.py
β
X
π test_buffer.py
β
X
π test_bufio.py
β
X
π test_builtin.py
β
X
π test_bytes.py
β
X
π test_bz2.py
β
X
π test_c_locale_coercion.py
β
X
π test_calendar.py
β
X
π test_call.py
β
X
π test_capi/
X
π test_cgi.py
β
X
π test_cgitb.py
β
X
π test_charmapcodec.py
β
X
π test_check_c_globals.py
β
X
π test_class.py
β
X
π test_clinic.py
β
X
π test_cmath.py
β
X
π test_cmd.py
β
X
π test_cmd_line.py
β
X
π test_cmd_line_script.py
β
X
π test_code.py
β
X
π test_code_module.py
β
X
π test_codeccallbacks.py
β
X
π test_codecencodings_cn.py
β
X
π test_codecencodings_hk.py
β
X
π test_codecencodings_iso2022.py
β
X
π test_codecencodings_jp.py
β
X
π test_codecencodings_kr.py
β
X
π test_codecencodings_tw.py
β
X
π test_codecmaps_cn.py
β
X
π test_codecmaps_hk.py
β
X
π test_codecmaps_jp.py
β
X
π test_codecmaps_kr.py
β
X
π test_codecmaps_tw.py
β
X
π test_codecs.py
β
X
π test_codeop.py
β
X
π test_collections.py
β
X
π test_colorsys.py
β
X
π test_compare.py
β
X
π test_compile.py
β
X
π test_compileall.py
β
X
π test_complex.py
β
X
π test_concurrent_futures/
X
π test_configparser.py
β
X
π test_contains.py
β
X
π test_context.py
β
X
π test_contextlib.py
β
X
π test_contextlib_async.py
β
X
π test_copy.py
β
X
π test_copyreg.py
β
X
π test_coroutines.py
β
X
π test_cppext/
X
π test_cprofile.py
β
X
π test_crashers.py
β
X
π test_crypt.py
β
X
π test_csv.py
β
X
π test_ctypes.py
β
X
π test_curses.py
β
X
π test_dataclasses/
X
π test_datetime.py
β
X
π test_dbm.py
β
X
π test_dbm_dumb.py
β
X
π test_dbm_gnu.py
β
X
π test_dbm_ndbm.py
β
X
π test_decimal.py
β
X
π test_decorators.py
β
X
π test_defaultdict.py
β
X
π test_deque.py
β
X
π test_descr.py
β
X
π test_descrtut.py
β
X
π test_devpoll.py
β
X
π test_dict.py
β
X
π test_dict_version.py
β
X
π test_dictcomps.py
β
X
π test_dictviews.py
β
X
π test_difflib.py
β
X
π test_difflib_expect.html
β
X
π test_dis.py
β
X
π test_distutils.py
β
X
π test_doctest/
X
π test_docxmlrpc.py
β
X
π test_dtrace.py
β
X
π test_dynamic.py
β
X
π test_dynamicclassattribute.py
β
X
π test_eintr.py
β
X
π test_email/
X
π test_embed.py
β
X
π test_ensurepip.py
β
X
π test_enum.py
β
X
π test_enumerate.py
β
X
π test_eof.py
β
X
π test_epoll.py
β
X
π test_errno.py
β
X
π test_except_star.py
β
X
π test_exception_group.py
β
X
π test_exception_hierarchy.py
β
X
π test_exception_variations.py
β
X
π test_exceptions.py
β
X
π test_extcall.py
β
X
π test_faulthandler.py
β
X
π test_fcntl.py
β
X
π test_file.py
β
X
π test_file_eintr.py
β
X
π test_filecmp.py
β
X
π test_fileinput.py
β
X
π test_fileio.py
β
X
π test_fileutils.py
β
X
π test_finalization.py
β
X
π test_float.py
β
X
π test_flufl.py
β
X
π test_fnmatch.py
β
X
π test_fork1.py
β
X
π test_format.py
β
X
π test_fractions.py
β
X
π test_frame.py
β
X
π test_frozen.py
β
X
π test_fstring.py
β
X
π test_ftplib.py
β
X
π test_funcattrs.py
β
X
π test_functools.py
β
X
π test_future_stmt/
X
π test_gc.py
β
X
π test_gdb/
X
π test_generator_stop.py
β
X
π test_generators.py
β
X
π test_genericalias.py
β
X
π test_genericclass.py
β
X
π test_genericpath.py
β
X
π test_genexps.py
β
X
π test_getopt.py
β
X
π test_getpass.py
β
X
π test_getpath.py
β
X
π test_gettext.py
β
X
π test_glob.py
β
X
π test_global.py
β
X
π test_grammar.py
β
X
π test_graphlib.py
β
X
π test_grp.py
β
X
π test_gzip.py
β
X
π test_hash.py
β
X
π test_hashlib.py
β
X
π test_heapq.py
β
X
π test_hmac.py
β
X
π test_html.py
β
X
π test_htmlparser.py
β
X
π test_http_cookiejar.py
β
X
π test_http_cookies.py
β
X
π test_httplib.py
β
X
π test_httpservers.py
β
X
π test_idle.py
β
X
π test_imaplib.py
β
X
π test_imghdr.py
β
X
π test_imp.py
β
X
π test_import/
X
π test_importlib/
X
π test_index.py
β
X
π test_inspect/
X
π test_int.py
β
X
π test_int_literal.py
β
X
π test_interpreters.py
β
X
π test_io.py
β
X
π test_ioctl.py
β
X
π test_ipaddress.py
β
X
π test_isinstance.py
β
X
π test_iter.py
β
X
π test_iterlen.py
β
X
π test_itertools.py
β
X
π test_json/
X
π test_keyword.py
β
X
π test_keywordonlyarg.py
β
X
π test_kqueue.py
β
X
π test_largefile.py
β
X
π test_launcher.py
β
X
π test_lib2to3.py
β
X
π test_linecache.py
β
X
π test_list.py
β
X
π test_listcomps.py
β
X
π test_lltrace.py
β
X
π test_locale.py
β
X
π test_logging.py
β
X
π test_long.py
β
X
π test_longexp.py
β
X
π test_lzma.py
β
X
π test_mailbox.py
β
X
π test_mailcap.py
β
X
π test_marshal.py
β
X
π test_math.py
β
X
π test_memoryio.py
β
X
π test_memoryview.py
β
X
π test_metaclass.py
β
X
π test_mimetypes.py
β
X
π test_minidom.py
β
X
π test_mmap.py
β
X
π test_module/
X
π test_modulefinder.py
β
X
π test_msilib.py
β
X
π test_multibytecodec.py
β
X
π test_multiprocessing_fork/
X
π test_multiprocessing_forkserver/
X
π test_multiprocessing_main_handling.py
β
X
π test_multiprocessing_spawn/
X
π test_named_expressions.py
β
X
π test_netrc.py
β
X
π test_nis.py
β
X
π test_nntplib.py
β
X
π test_ntpath.py
β
X
π test_numeric_tower.py
β
X
π test_opcache.py
β
X
π test_opcodes.py
β
X
π test_openpty.py
β
X
π test_operator.py
β
X
π test_optparse.py
β
X
π test_ordered_dict.py
β
X
π test_os.py
β
X
π test_ossaudiodev.py
β
X
π test_osx_env.py
β
X
π test_pathlib.py
β
X
π test_patma.py
β
X
π test_pdb.py
β
X
π test_peepholer.py
β
X
π test_peg_generator/
X
π test_pep646_syntax.py
β
X
π test_pickle.py
β
X
π test_picklebuffer.py
β
X
π test_pickletools.py
β
X
π test_pipes.py
β
X
π test_pkg.py
β
X
π test_pkgutil.py
β
X
π test_platform.py
β
X
π test_plistlib.py
β
X
π test_poll.py
β
X
π test_popen.py
β
X
π test_poplib.py
β
X
π test_positional_only_arg.py
β
X
π test_posix.py
β
X
π test_posixpath.py
β
X
π test_pow.py
β
X
π test_pprint.py
β
X
π test_print.py
β
X
π test_profile.py
β
X
π test_property.py
β
X
π test_pstats.py
β
X
π test_pty.py
β
X
π test_pulldom.py
β
X
π test_pwd.py
β
X
π test_py_compile.py
β
X
π test_pyclbr.py
β
X
π test_pydoc/
X
π test_pyexpat.py
β
X
π test_queue.py
β
X
π test_quopri.py
β
X
π test_raise.py
β
X
π test_random.py
β
X
π test_range.py
β
X
π test_re.py
β
X
π test_readline.py
β
X
π test_regrtest.py
β
X
π test_repl.py
β
X
π test_reprlib.py
β
X
π test_resource.py
β
X
π test_richcmp.py
β
X
π test_rlcompleter.py
β
X
π test_robotparser.py
β
X
π test_runpy.py
β
X
π test_sax.py
β
X
π test_sched.py
β
X
π test_scope.py
β
X
π test_script_helper.py
β
X
π test_secrets.py
β
X
π test_select.py
β
X
π test_selectors.py
β
X
π test_set.py
β
X
π test_setcomps.py
β
X
π test_shelve.py
β
X
π test_shlex.py
β
X
π test_shutil.py
β
X
π test_signal.py
β
X
π test_site.py
β
X
π test_slice.py
β
X
π test_smtpd.py
β
X
π test_smtplib.py
β
X
π test_smtpnet.py
β
X
π test_sndhdr.py
β
X
π test_socket.py
β
X
π test_socketserver.py
β
X
π test_sort.py
β
X
π test_source_encoding.py
β
X
π test_spwd.py
β
X
π test_sqlite3/
X
π test_ssl.py
β
X
π test_stable_abi_ctypes.py
β
X
π test_startfile.py
β
X
π test_stat.py
β
X
π test_statistics.py
β
X
π test_strftime.py
β
X
π test_string.py
β
X
π test_string_literals.py
β
X
π test_stringprep.py
β
X
π test_strptime.py
β
X
π test_strtod.py
β
X
π test_struct.py
β
X
π test_structseq.py
β
X
π test_subclassinit.py
β
X
π test_subprocess.py
β
X
π test_sunau.py
β
X
π test_sundry.py
β
X
π test_super.py
β
X
π test_support.py
β
X
π test_symtable.py
β
X
π test_syntax.py
β
X
π test_sys.py
β
X
π test_sys_setprofile.py
β
X
π test_sys_settrace.py
β
X
π test_sysconfig.py
β
X
π test_syslog.py
β
X
π test_tabnanny.py
β
X
π test_tarfile.py
β
X
π test_tcl.py
β
X
π test_telnetlib.py
β
X
π test_tempfile.py
β
X
π test_termios.py
β
X
π test_textwrap.py
β
X
π test_thread.py
β
X
π test_threadedtempfile.py
β
X
π test_threading.py
β
X
π test_threading_local.py
β
X
π test_threadsignals.py
β
X
π test_time.py
β
X
π test_timeit.py
β
X
π test_timeout.py
β
X
π test_tix.py
β
X
π test_tk.py
β
X
π test_tokenize.py
β
X
π test_tomllib/
X
π test_tools/
X
π test_trace.py
β
X
π test_traceback.py
β
X
π test_tracemalloc.py
β
X
π test_ttk_guionly.py
β
X
π test_ttk_textonly.py
β
X
π test_tty.py
β
X
π test_tuple.py
β
X
π test_turtle.py
β
X
π test_type_annotations.py
β
X
π test_type_cache.py
β
X
π test_type_comments.py
β
X
π test_typechecks.py
β
X
π test_types.py
β
X
π test_typing.py
β
X
π test_ucn.py
β
X
π test_unary.py
β
X
π test_unicode.py
β
X
π test_unicode_file.py
β
X
π test_unicode_file_functions.py
β
X
π test_unicode_identifiers.py
β
X
π test_unicodedata.py
β
X
π test_unittest.py
β
X
π test_univnewlines.py
β
X
π test_unpack.py
β
X
π test_unpack_ex.py
β
X
π test_unparse.py
β
X
π test_urllib.py
β
X
π test_urllib2.py
β
X
π test_urllib2_localnet.py
β
X
π test_urllib2net.py
β
X
π test_urllib_response.py
β
X
π test_urllibnet.py
β
X
π test_urlparse.py
β
X
π test_userdict.py
β
X
π test_userlist.py
β
X
π test_userstring.py
β
X
π test_utf8_mode.py
β
X
π test_utf8source.py
β
X
π test_uu.py
β
X
π test_uuid.py
β
X
π test_venv.py
β
X
π test_wait3.py
β
X
π test_wait4.py
β
X
π test_warnings/
X
π test_wave.py
β
X
π test_weakref.py
β
X
π test_weakset.py
β
X
π test_webbrowser.py
β
X
π test_winconsoleio.py
β
X
π test_winreg.py
β
X
π test_winsound.py
β
X
π test_with.py
β
X
π test_wsgiref.py
β
X
π test_xdrlib.py
β
X
π test_xml_dom_minicompat.py
β
X
π test_xml_etree.py
β
X
π test_xml_etree_c.py
β
X
π test_xmlrpc.py
β
X
π test_xmlrpc_net.py
β
X
π test_xxlimited.py
β
X
π test_xxtestfuzz.py
β
X
π test_yield_from.py
β
X
π test_zipapp.py
β
X
π test_zipfile.py
β
X
π test_zipfile64.py
β
X
π test_zipimport.py
β
X
π test_zipimport_support.py
β
X
π test_zlib.py
β
X
π test_zoneinfo/
X
π testcodec.py
β
X
π testtar.tar
β
X
π testtar.tar.xz
β
X
π tf_inherit_check.py
β
X
π time_hashlib.py
β
X
π tokenizedata/
X
π tracedmodules/
X
π typinganndata/
X
π win_console_handler.py
β
X
π xmltestdata/
X
π xmltests.py
β
X
π zip_cp437_header.zip
β
X
π zipdir.zip
β
X
π zipdir_backslash.zip
β
X
π ziptestdata/
X
SAVING...
BERHASIL DIUBAH!
EDITING: test_msilib.py
""" Test suite for the code in msilib """ import os import unittest from test.support.import_helper import import_module from test.support.os_helper import TESTFN, unlink import warnings with warnings.catch_warnings(): warnings.simplefilter("ignore", DeprecationWarning) msilib = import_module('msilib') import msilib.schema def init_database(): path = TESTFN + '.msi' db = msilib.init_database( path, msilib.schema, 'Python Tests', 'product_code', '1.0', 'PSF', ) return db, path class MsiDatabaseTestCase(unittest.TestCase): def test_view_fetch_returns_none(self): db, db_path = init_database() properties = [] view = db.OpenView('SELECT Property, Value FROM Property') view.Execute(None) while True: record = view.Fetch() if record is None: break properties.append(record.GetString(1)) view.Close() db.Close() self.assertEqual( properties, [ 'ProductName', 'ProductCode', 'ProductVersion', 'Manufacturer', 'ProductLanguage', ] ) self.addCleanup(unlink, db_path) def test_view_non_ascii(self): db, db_path = init_database() view = db.OpenView("SELECT 'Γ-ΡΠΎΠ·ΠΏΠ°Π΄' FROM Property") view.Execute(None) record = view.Fetch() self.assertEqual(record.GetString(1), 'Γ-ΡΠΎΠ·ΠΏΠ°Π΄') view.Close() db.Close() self.addCleanup(unlink, db_path) def test_summaryinfo_getproperty_issue1104(self): db, db_path = init_database() try: sum_info = db.GetSummaryInformation(99) title = sum_info.GetProperty(msilib.PID_TITLE) self.assertEqual(title, b"Installation Database") sum_info.SetProperty(msilib.PID_TITLE, "a" * 999) title = sum_info.GetProperty(msilib.PID_TITLE) self.assertEqual(title, b"a" * 999) sum_info.SetProperty(msilib.PID_TITLE, "a" * 1000) title = sum_info.GetProperty(msilib.PID_TITLE) self.assertEqual(title, b"a" * 1000) sum_info.SetProperty(msilib.PID_TITLE, "a" * 1001) title = sum_info.GetProperty(msilib.PID_TITLE) self.assertEqual(title, b"a" * 1001) finally: db = None sum_info = None os.unlink(db_path) def test_database_open_failed(self): with self.assertRaises(msilib.MSIError) as cm: msilib.OpenDatabase('non-existent.msi', msilib.MSIDBOPEN_READONLY) self.assertEqual(str(cm.exception), 'open failed') def test_database_create_failed(self): db_path = os.path.join(TESTFN, 'test.msi') with self.assertRaises(msilib.MSIError) as cm: msilib.OpenDatabase(db_path, msilib.MSIDBOPEN_CREATE) self.assertEqual(str(cm.exception), 'create failed') def test_get_property_vt_empty(self): db, db_path = init_database() summary = db.GetSummaryInformation(0) self.assertIsNone(summary.GetProperty(msilib.PID_SECURITY)) db.Close() self.addCleanup(unlink, db_path) def test_directory_start_component_keyfile(self): db, db_path = init_database() self.addCleanup(unlink, db_path) self.addCleanup(db.Close) self.addCleanup(msilib._directories.clear) feature = msilib.Feature(db, 0, 'Feature', 'A feature', 'Python') cab = msilib.CAB('CAB') dir = msilib.Directory(db, cab, None, TESTFN, 'TARGETDIR', 'SourceDir', 0) dir.start_component(None, feature, None, 'keyfile') def test_getproperty_uninitialized_var(self): db, db_path = init_database() self.addCleanup(unlink, db_path) self.addCleanup(db.Close) si = db.GetSummaryInformation(0) with self.assertRaises(msilib.MSIError): si.GetProperty(-1) def test_FCICreate(self): filepath = TESTFN + '.txt' cabpath = TESTFN + '.cab' self.addCleanup(unlink, filepath) with open(filepath, 'wb'): pass self.addCleanup(unlink, cabpath) msilib.FCICreate(cabpath, [(filepath, 'test.txt')]) self.assertTrue(os.path.isfile(cabpath)) class Test_make_id(unittest.TestCase): #http://msdn.microsoft.com/en-us/library/aa369212(v=vs.85).aspx """The Identifier data type is a text string. Identifiers may contain the ASCII characters A-Z (a-z), digits, underscores (_), or periods (.). However, every identifier must begin with either a letter or an underscore. """ def test_is_no_change_required(self): self.assertEqual( msilib.make_id("short"), "short") self.assertEqual( msilib.make_id("nochangerequired"), "nochangerequired") self.assertEqual( msilib.make_id("one.dot"), "one.dot") self.assertEqual( msilib.make_id("_"), "_") self.assertEqual( msilib.make_id("a"), "a") #self.assertEqual( # msilib.make_id(""), "") def test_invalid_first_char(self): self.assertEqual( msilib.make_id("9.short"), "_9.short") self.assertEqual( msilib.make_id(".short"), "_.short") def test_invalid_any_char(self): self.assertEqual( msilib.make_id(".s\x82ort"), "_.s_ort") self.assertEqual( msilib.make_id(".s\x82o?*+rt"), "_.s_o___rt") if __name__ == '__main__': unittest.main()
SIMPAN PERUBAHAN