• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python md_common.silent_remove函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: testWaterMol

 def testWaterMol(self):
     try:
         main(["-c", WATER_MOL_INI])
         self.assertFalse(diff_lines(WATER_MOL_OUT1, GOOD_WATER_MOL_OUT1))
         self.assertFalse(diff_lines(WATER_MOL_OUT2, GOOD_WATER_MOL_OUT2))
     finally:
         silent_remove(WATER_MOL_OUT1, disable=DISABLE_REMOVE)
         silent_remove(WATER_MOL_OUT2, disable=DISABLE_REMOVE)
开发者ID:team-mayes,项目名称:md_utils,代码行数:8,代码来源:test_evb_get_info.py


示例17: testDupCol

 def testDupCol(self):
     test_input = ["-f", DUP_COL_CMP_LIST]
     if logger.isEnabledFor(logging.DEBUG):
         main(test_input)
     with capture_stderr(main, test_input) as output:
         self.assertFalse(diff_lines(DEF_OUT, GOOD_OUT))
         self.assertTrue("Non-unique column" in output)
     silent_remove(DEF_OUT, disable=DISABLE_REMOVE)
开发者ID:team-mayes,项目名称:md_utils,代码行数:8,代码来源:test_align_on_col.py


示例18: testAddNothing

 def testAddNothing(self):
     # this first test does not really doing anything, and warns the user
     try:
         with capture_stderr(main, [INPUT_PATH]) as output:
             self.assertTrue("Return file will be the same as the input" in output)
         self.assertFalse(diff_lines(INPUT_PATH, DEF_OUT_PATH))
     finally:
         silent_remove(DEF_OUT_PATH)
开发者ID:team-mayes,项目名称:md_utils,代码行数:8,代码来源:test_add_to_each_line.py


示例19: testNoMinNonFloat

 def testNoMinNonFloat(self):
     # Tests both handling when no min section is specified and non-floats in the file to be analyzed
     test_input = ["-f", NON_FLOAT_INPUT, "-c", NO_MIN_INI]
     try:
         main(test_input)
         self.assertFalse(diff_lines(NON_FLOAT_OUT, GOOD_NON_FLOAT_OUT))
     finally:
         silent_remove(NON_FLOAT_OUT)
开发者ID:team-mayes,项目名称:md_utils,代码行数:8,代码来源:test_filter_col.py


示例20: testCompDihAlt

 def testCompDihAlt(self):
     # Test it is okay with sections in the 1st but not 2nd file
     with capture_stderr(main, ["-c", COMP_DIH_ALT_INI]) as output:
         self.assertTrue("WARNING:  Skipping section" in output)
     try:
         self.assertFalse(diff_lines(COMP_DIH_ALT_OUT, COMP_DIH_ALT_OUT_GOOD))
     finally:
         silent_remove(COMP_DIH_ALT_OUT, disable=DISABLE_REMOVE)
开发者ID:team-mayes,项目名称:md_utils,代码行数:8,代码来源:test_data_edit.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python md_common.warning函数代码示例发布时间:2022-05-27
下一篇:
Python md_common.diff_lines函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap