Author: bugman Date: Wed Mar 20 14:15:29 2013 New Revision: 18912 URL: http://svn.gna.org/viewcvs/relax?rev=18912&view=rev Log: Merged revisions 18909-18911 via svnmerge from svn+ssh://bugman@xxxxxxxxxxx/svn/relax/trunk ........ r18909 | bugman | 2013-03-20 13:49:49 +0100 (Wed, 20 Mar 2013) | 3 lines Modified the Mf.test_dauvergne_protocol system test to check for all the files and directories created. ........ r18910 | bugman | 2013-03-20 14:13:27 +0100 (Wed, 20 Mar 2013) | 5 lines Created the new lib.text.sectioning module for formatting titles, subtitles and other sectioning text. The two functions title() and subtitle() have been implemented. ........ r18911 | bugman | 2013-03-20 14:13:55 +0100 (Wed, 20 Mar 2013) | 3 lines Created unit tests for the title() and subtitle() functions of the lib.text.sectioning module. ........ Added: branches/frame_order_testing/lib/text/sectioning.py - copied unchanged from r18911, trunk/lib/text/sectioning.py branches/frame_order_testing/test_suite/unit_tests/_lib/_text/test_sectioning.py - copied unchanged from r18911, trunk/test_suite/unit_tests/_lib/_text/test_sectioning.py Modified: branches/frame_order_testing/ (props changed) branches/frame_order_testing/lib/text/__init__.py branches/frame_order_testing/test_suite/system_tests/model_free.py branches/frame_order_testing/test_suite/unit_tests/_lib/_text/__init__.py Propchange: branches/frame_order_testing/ ------------------------------------------------------------------------------ --- svnmerge-integrated (original) +++ svnmerge-integrated Wed Mar 20 14:15:29 2013 @@ -1,1 +1,1 @@ -/trunk:1-18907 +/trunk:1-18911 Modified: branches/frame_order_testing/lib/text/__init__.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_testing/lib/text/__init__.py?rev=18912&r1=18911&r2=18912&view=diff ============================================================================== --- branches/frame_order_testing/lib/text/__init__.py (original) +++ branches/frame_order_testing/lib/text/__init__.py Wed Mar 20 14:15:29 2013 @@ -23,5 +23,6 @@ """The relax-lib text package - a library of functions for text manipulation.""" __all__ = [ + 'sectioning', 'table' ] Modified: branches/frame_order_testing/test_suite/system_tests/model_free.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_testing/test_suite/system_tests/model_free.py?rev=18912&r1=18911&r2=18912&view=diff ============================================================================== --- branches/frame_order_testing/test_suite/system_tests/model_free.py (original) +++ branches/frame_order_testing/test_suite/system_tests/model_free.py Wed Mar 20 14:15:29 2013 @@ -23,7 +23,7 @@ from math import pi import platform import numpy -from os import sep +from os import path, sep, walk from re import search from shutil import copytree import sys @@ -562,6 +562,169 @@ i = 0 for interatom in interatomic_loop(): self.assertAlmostEqual(interatom.r, 1.02 * 1e-10) + + # File and directory formatting strings. + format1 = "%s%s%s" % (ds.tmpdir, sep, '%s') + format2 = "%s%s%s%s%s" % (ds.tmpdir, sep, '%s', sep, '%s') + format3 = "%s%s%s%s%s%s%s" % (ds.tmpdir, sep, '%s', sep, '%s', sep, '%s') + format4 = "%s%s%s%s%s%s%s%s%s" % (ds.tmpdir, sep, '%s', sep, '%s', sep, '%s', sep, '%s') + + # Check the generated directories. + dirs = [ + format1 % ("local_tm"), + format2 % ("local_tm", "tm1"), + format2 % ("local_tm", "tm0"), + format2 % ("local_tm", "aic"), + format1 % ("sphere"), + format2 % ("sphere", "init"), + format2 % ("sphere", "round_1"), + format3 % ("sphere", "round_1", "m1"), + format3 % ("sphere", "round_1", "m2"), + format3 % ("sphere", "round_1", "aic"), + format3 % ("sphere", "round_1", "opt"), + format2 % ("sphere", "round_2"), + format3 % ("sphere", "round_2", "m1"), + format3 % ("sphere", "round_2", "m2"), + format3 % ("sphere", "round_2", "aic"), + format3 % ("sphere", "round_2", "opt"), + format1 % ("prolate"), + format2 % ("prolate", "init"), + format2 % ("prolate", "round_1"), + format3 % ("prolate", "round_1", "m1"), + format3 % ("prolate", "round_1", "m2"), + format3 % ("prolate", "round_1", "aic"), + format3 % ("prolate", "round_1", "opt"), + format2 % ("prolate", "round_2"), + format3 % ("prolate", "round_2", "m1"), + format3 % ("prolate", "round_2", "m2"), + format3 % ("prolate", "round_2", "aic"), + format3 % ("prolate", "round_2", "opt"), + format1 % ("oblate"), + format2 % ("oblate", "init"), + format2 % ("oblate", "round_1"), + format3 % ("oblate", "round_1", "m1"), + format3 % ("oblate", "round_1", "m2"), + format3 % ("oblate", "round_1", "aic"), + format3 % ("oblate", "round_1", "opt"), + format2 % ("oblate", "round_2"), + format3 % ("oblate", "round_2", "m1"), + format3 % ("oblate", "round_2", "m2"), + format3 % ("oblate", "round_2", "aic"), + format3 % ("oblate", "round_2", "opt"), + format1 % ("ellipsoid"), + format2 % ("ellipsoid", "init"), + format2 % ("ellipsoid", "round_1"), + format3 % ("ellipsoid", "round_1", "m1"), + format3 % ("ellipsoid", "round_1", "m2"), + format3 % ("ellipsoid", "round_1", "aic"), + format3 % ("ellipsoid", "round_1", "opt"), + format2 % ("ellipsoid", "round_2"), + format3 % ("ellipsoid", "round_2", "m1"), + format3 % ("ellipsoid", "round_2", "m2"), + format3 % ("ellipsoid", "round_2", "aic"), + format3 % ("ellipsoid", "round_2", "opt"), + format1 % ("final"), + format2 % ("final", "grace"), + format2 % ("final", "pymol"), + format2 % ("final", "molmol") + ] + for root, dirs, files in walk(ds.tmpdir): + for dir in dirs: + dir_path = "%s%s%s" % (root, sep, dir) + print("Checking for the directory '%s'." % dir_path) + self.assert_(path.isdir(dir_path)) + + # Check the generated files. + files = [ + format3 % ("local_tm", "tm0", "results.bz2"), + format3 % ("local_tm", "tm1", "results.bz2"), + format3 % ("local_tm", "aic", "results.bz2"), + format3 % ("sphere", "init", "results.bz2"), + format4 % ("sphere", "round_1", "m1", "results.bz2"), + format4 % ("sphere", "round_1", "m2", "results.bz2"), + format4 % ("sphere", "round_1", "aic", "results.bz2"), + format4 % ("sphere", "round_1", "opt", "results.bz2"), + format4 % ("sphere", "round_2", "m1", "results.bz2"), + format4 % ("sphere", "round_2", "m2", "results.bz2"), + format4 % ("sphere", "round_2", "aic", "results.bz2"), + format4 % ("sphere", "round_2", "opt", "results.bz2"), + format3 % ("prolate", "init", "results.bz2"), + format4 % ("prolate", "round_1", "m1", "results.bz2"), + format4 % ("prolate", "round_1", "m2", "results.bz2"), + format4 % ("prolate", "round_1", "aic", "results.bz2"), + format4 % ("prolate", "round_1", "opt", "results.bz2"), + format4 % ("prolate", "round_2", "m1", "results.bz2"), + format4 % ("prolate", "round_2", "m2", "results.bz2"), + format4 % ("prolate", "round_2", "aic", "results.bz2"), + format4 % ("prolate", "round_2", "opt", "results.bz2"), + format3 % ("oblate", "init", "results.bz2"), + format4 % ("oblate", "round_1", "m1", "results.bz2"), + format4 % ("oblate", "round_1", "m2", "results.bz2"), + format4 % ("oblate", "round_1", "aic", "results.bz2"), + format4 % ("oblate", "round_1", "opt", "results.bz2"), + format4 % ("oblate", "round_2", "m1", "results.bz2"), + format4 % ("oblate", "round_2", "m2", "results.bz2"), + format4 % ("oblate", "round_2", "aic", "results.bz2"), + format4 % ("oblate", "round_2", "opt", "results.bz2"), + format3 % ("ellipsoid", "init", "results.bz2"), + format4 % ("ellipsoid", "round_1", "m1", "results.bz2"), + format4 % ("ellipsoid", "round_1", "m2", "results.bz2"), + format4 % ("ellipsoid", "round_1", "aic", "results.bz2"), + format4 % ("ellipsoid", "round_1", "opt", "results.bz2"), + format4 % ("ellipsoid", "round_2", "m1", "results.bz2"), + format4 % ("ellipsoid", "round_2", "m2", "results.bz2"), + format4 % ("ellipsoid", "round_2", "aic", "results.bz2"), + format4 % ("ellipsoid", "round_2", "opt", "results.bz2"), + format2 % ("final", "results.bz2"), + format2 % ("final", "s2.txt"), + format2 % ("final", "s2f.txt"), + format2 % ("final", "s2s.txt"), + format2 % ("final", "local_tm.txt"), + format2 % ("final", "te.txt"), + format2 % ("final", "tf.txt"), + format2 % ("final", "ts.txt"), + format2 % ("final", "rex.txt"), + format2 % ("final", "rex_500.txt"), + format2 % ("final", "rex_900.txt"), + format2 % ("final", "tensor.pdb"), + format3 % ("final", "grace", "s2.agr"), + format3 % ("final", "grace", "s2f.agr"), + format3 % ("final", "grace", "s2s.agr"), + format3 % ("final", "grace", "te.agr"), + format3 % ("final", "grace", "tf.agr"), + format3 % ("final", "grace", "ts.agr"), + format3 % ("final", "grace", "rex.agr"), + format3 % ("final", "grace", "s2_vs_rex.agr"), + format3 % ("final", "grace", "s2_vs_te.agr"), + format3 % ("final", "grace", "te_vs_rex.agr"), + format3 % ("final", "pymol", "s2.pml"), + format3 % ("final", "pymol", "s2f.pml"), + format3 % ("final", "pymol", "s2s.pml"), + format3 % ("final", "pymol", "amp_fast.pml"), + format3 % ("final", "pymol", "amp_slow.pml"), + format3 % ("final", "pymol", "te.pml"), + format3 % ("final", "pymol", "tf.pml"), + format3 % ("final", "pymol", "ts.pml"), + format3 % ("final", "pymol", "time_fast.pml"), + format3 % ("final", "pymol", "time_slow.pml"), + format3 % ("final", "pymol", "rex.pml"), + format3 % ("final", "molmol", "s2.mac"), + format3 % ("final", "molmol", "s2f.mac"), + format3 % ("final", "molmol", "s2s.mac"), + format3 % ("final", "molmol", "amp_fast.mac"), + format3 % ("final", "molmol", "amp_slow.mac"), + format3 % ("final", "molmol", "te.mac"), + format3 % ("final", "molmol", "tf.mac"), + format3 % ("final", "molmol", "ts.mac"), + format3 % ("final", "molmol", "time_fast.mac"), + format3 % ("final", "molmol", "time_slow.mac"), + format3 % ("final", "molmol", "rex.mac"), + ] + for root, dirs, files in walk(ds.tmpdir): + for file in files: + file_path = "%s%s%s" % (root, sep, file) + print("Checking for the file '%s'." % file_path) + self.assert_(path.isfile(file_path)) def test_generate_ri(self): Modified: branches/frame_order_testing/test_suite/unit_tests/_lib/_text/__init__.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_testing/test_suite/unit_tests/_lib/_text/__init__.py?rev=18912&r1=18911&r2=18912&view=diff ============================================================================== --- branches/frame_order_testing/test_suite/unit_tests/_lib/_text/__init__.py (original) +++ branches/frame_order_testing/test_suite/unit_tests/_lib/_text/__init__.py Wed Mar 20 14:15:29 2013 @@ -21,5 +21,7 @@ __all__ = [ - 'test___init__' + 'test___init__', + 'test_sectioning', + 'test_table' ]