当前位置: 首页>>代码示例>>Python>>正文


Python md_common.silent_remove函数代码示例

本文整理汇总了Python中md_utils.md_common.silent_remove函数的典型用法代码示例。如果您正苦于以下问题:Python silent_remove函数的具体用法?Python silent_remove怎么用?Python silent_remove使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了silent_remove函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: testCheckCharge

 def testCheckCharge(self):
     try:
         with capture_stdout(main, ["-c", CHECK_CHARGE_INI]) as output:
             self.assertFalse("total charge" in output)
     finally:
         silent_remove(VMD_OUT)
         silent_remove(WATER_OUT)
开发者ID:team-mayes,项目名称:md_utils,代码行数:7,代码来源:test_evb_chk_get_info.py

示例2: testDefInp

 def testDefInp(self):
     try:
         with capture_stdout(main, ["-f", DEF_INPUT]) as output:
             self.assertTrue(GOOD_OUT in output)
             self.assertFalse(diff_lines(CSV_OUT, GOOD_CSV_OUT))
     finally:
         silent_remove(CSV_OUT, disable=DISABLE_REMOVE)
开发者ID:team-mayes,项目名称:md_utils,代码行数:7,代码来源:test_col_stats.py

示例3: testDefInp

 def testDefInp(self):
     try:
         with capture_stdout(main, ["-f", DEF_INPUT, "-c", DEF_INI]) as output:
             self.assertTrue("Keeping 2 of 4 rows based on filtering criteria" in output)
         self.assertFalse(diff_lines(CSV_OUT, GOOD_CSV_OUT))
     finally:
         silent_remove(CSV_OUT)
开发者ID:team-mayes,项目名称:md_utils,代码行数:7,代码来源:test_filter_col.py

示例4: testTplDumpMismatch

 def testTplDumpMismatch(self):
     try:
         with capture_stderr(evbdump2data.main, ["-c", TPL_DUMP_MISMATCH_INI]) as output:
             self.assertTrue("listed number of atoms (214084) does not equal the number of atoms in the "
                             "template data file (1429)" in output)
     finally:
         silent_remove(REPROD_TPL)
开发者ID:team-mayes,项目名称:md_utils,代码行数:7,代码来源:test_evbdump2data.py

示例5: testIncompDump

 def testIncompDump(self):
     try:
         with capture_stderr(main, ["-c", INCOMP_DUMP_INI_PATH]) as output:
             self.assertTrue("WARNING" in output)
         self.assertFalse(diff_lines(DEF_GOFR_INCOMP_OUT, GOOD_HO_GOFR_OUT_PATH))
     finally:
         silent_remove(DEF_GOFR_INCOMP_OUT, disable=DISABLE_REMOVE)
开发者ID:team-mayes,项目名称:md_utils,代码行数:7,代码来源:test_lammps_proc.py

示例6: testMaxTimestepsCalcHIJ

 def testMaxTimestepsCalcHIJ(self):
     try:
         with capture_stdout(main, ["-c", HIJ_INI]) as output:
             self.assertTrue("Reached the maximum timesteps" in output)
         self.assertFalse(diff_lines(HIJ_OUT, GOOD_HIJ_OUT))
     finally:
         silent_remove(HIJ_OUT, disable=DISABLE_REMOVE)
开发者ID:team-mayes,项目名称:md_utils,代码行数:7,代码来源:test_lammps_proc.py

示例7: testGlu

 def testGlu(self):
     try:
         data2pdb.main(["-c", GLU_INI])
         self.assertFalse(diff_lines(GLU_OUT, GOOD_GLU_OUT))
     finally:
         silent_remove(PDB_TPL_OUT)
         silent_remove(GLU_OUT)
开发者ID:team-mayes,项目名称:md_utils,代码行数:7,代码来源:test_data2pdb.py

示例8: testDefInp

 def testDefInp(self):
     test_input = ["-c", DEF_INI, "-f", DEF_INPUT]
     try:
         main(test_input)
         self.assertFalse(diff_lines(DEF_OUT, GOOD_OUT))
     finally:
         silent_remove(DEF_OUT, disable=DISABLE_REMOVE)
开发者ID:team-mayes,项目名称:md_utils,代码行数:7,代码来源:test_comb_col.py

示例9: testWaterMolCombine

 def testWaterMolCombine(self):
     # Should skip the timestep with only 1 state
     try:
         main(["-c", WATER_MOL_COMB_INI])
         self.assertFalse(diff_lines(WATER_MOL_COMB_OUT, GOOD_WATER_MOL_COMB_OUT))
     finally:
         silent_remove(WATER_MOL_COMB_OUT)
开发者ID:team-mayes,项目名称:md_utils,代码行数:7,代码来源:test_evb_get_info.py

示例10: testEmreAddElements

 def testEmreAddElements(self):
     # As above, but a larger/different PDB
     try:
         main(["-c", EMRE_ADD_ELEMENT_INI])
         self.assertFalse(diff_lines(EMRE_ADD_ELEMENT_OUT, GOOD_EMRE_ADD_ELEMENT_OUT))
     finally:
         silent_remove(EMRE_ADD_ELEMENT_OUT)
开发者ID:team-mayes,项目名称:md_utils,代码行数:7,代码来源:test_pdb_edit.py

示例11: testSortFromLammps

 def testSortFromLammps(self):
     try:
         main(["-c", SORT_FROM_LAMMPS_INI])
         self.assertFalse(diff_lines(SORT_FROM_LAMMPS, SORT_FROM_LAMMPS_GOOD))
         self.assertFalse(diff_lines(SELECT_FROM_LAMMPS, SELECT_FROM_LAMMPS_GOOD))
     finally:
         silent_remove(SORT_FROM_LAMMPS, disable=DISABLE_REMOVE)
         silent_remove(SELECT_FROM_LAMMPS, disable=DISABLE_REMOVE)
开发者ID:team-mayes,项目名称:md_utils,代码行数:8,代码来源:test_data_edit.py

示例12: testBadInput

 def testBadInput(self):
     # Test what happens when cannot convert a value to float
     try:
         with capture_stderr(main, ["-f", BAD_INPUT]) as output:
             self.assertTrue("could not be converted to a float" in output)
             self.assertFalse(diff_lines(BAD_INPUT_OUT, GOOD_BAD_INPUT_OUT))
     finally:
         silent_remove(BAD_INPUT_OUT, disable=DISABLE_REMOVE)
开发者ID:team-mayes,项目名称:md_utils,代码行数:8,代码来源:test_col_stats.py

示例13: testBinMax2

 def testBinMax2(self):
     # In this input, both bins have more than the max entries
     test_input = ["-f", BIN_INPUT, "-c", BIN_MAX2_INI]
     try:
         main(test_input)
         self.assertFalse(diff_lines(DEF_BIN_OUT, GOOD_BIN_MAX2_OUT))
     finally:
         silent_remove(DEF_BIN_OUT, disable=DISABLE_REMOVE)
开发者ID:team-mayes,项目名称:md_utils,代码行数:8,代码来源:test_filter_col.py

示例14: testBinMax

 def testBinMax(self):
     # In this input, one big has more than the max and one less
     test_input = ["-f", BIN_INPUT, "-c", BIN_MAX_INI]
     try:
         main(test_input)
         # self.assertFalse(diff_lines(DEF_BIN_OUT, GOOD_BIN_MAX_OUT))
     finally:
         silent_remove(DEF_BIN_OUT, disable=DISABLE_REMOVE)
开发者ID:team-mayes,项目名称:md_utils,代码行数:8,代码来源:test_filter_col.py

示例15: testReorderAtoms

 def testReorderAtoms(self):
     try:
         with capture_stdout(main, ["-c", DEF_INI]) as output:
             for message in WATER_OUT_OF_ORDER_MESSAGES:
                 self.assertFalse(message in output)
         self.assertFalse(diff_lines(DEF_OUT, GOOD_OUT))
     finally:
         silent_remove(DEF_OUT)
开发者ID:team-mayes,项目名称:md_utils,代码行数:8,代码来源:test_pdb_edit.py


注:本文中的md_utils.md_common.silent_remove函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。