Author: bugman Date: Wed Feb 20 20:16:58 2013 New Revision: 18552 URL: http://svn.gna.org/viewcvs/relax?rev=18552&view=rev Log: Merged revisions 18550-18551 via svnmerge from svn+ssh://bugman@xxxxxxxxxxx/svn/relax/trunk ........ r18550 | bugman | 2013-02-20 20:12:39 +0100 (Wed, 20 Feb 2013) | 3 lines Created a unit test for the generic_fns.structure.pdb_write.model() function. ........ r18551 | bugman | 2013-02-20 20:16:11 +0100 (Wed, 20 Feb 2013) | 5 lines Fix for the generic_fns.structure.pdb_write.model() function. The correct amount of whitespace is now added to the end of the record. ........ Modified: branches/frame_order_testing/ (props changed) branches/frame_order_testing/generic_fns/structure/pdb_write.py branches/frame_order_testing/test_suite/unit_tests/_generic_fns/_structure/test_pdb_write.py Propchange: branches/frame_order_testing/ ------------------------------------------------------------------------------ --- svnmerge-integrated (original) +++ svnmerge-integrated Wed Feb 20 20:16:58 2013 @@ -1,1 +1,1 @@ -/trunk:1-18548 +/trunk:1-18551 Modified: branches/frame_order_testing/generic_fns/structure/pdb_write.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_testing/generic_fns/structure/pdb_write.py?rev=18552&r1=18551&r2=18552&view=diff ============================================================================== --- branches/frame_order_testing/generic_fns/structure/pdb_write.py (original) +++ branches/frame_order_testing/generic_fns/structure/pdb_write.py Wed Feb 20 20:16:58 2013 @@ -1454,7 +1454,7 @@ """ # The formatted record. - text = "%-6s %4i%65s" % ( + text = "%-6s %4i%66s" % ( 'MODEL', _handle_none(serial), '' Modified: branches/frame_order_testing/test_suite/unit_tests/_generic_fns/_structure/test_pdb_write.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_testing/test_suite/unit_tests/_generic_fns/_structure/test_pdb_write.py?rev=18552&r1=18551&r2=18552&view=diff ============================================================================== --- branches/frame_order_testing/test_suite/unit_tests/_generic_fns/_structure/test_pdb_write.py (original) +++ branches/frame_order_testing/test_suite/unit_tests/_generic_fns/_structure/test_pdb_write.py Wed Feb 20 20:16:58 2013 @@ -79,6 +79,23 @@ self.assertEqual(records[0], actual) + def test_model(self): + """Test the generic_fns.structure.pdb_write.model() function.""" + + # A dummy file to write to. + file = DummyFileObject() + + # Create the PDB record. + pdb_write.model(file, serial=1) + + # Test the record. + records = file.readlines() + actual = 'MODEL 1 \n' + print(repr(records[0])) + print(repr(actual)) + self.assertEqual(records[0], actual) + + def test_sheet(self): """Test the generic_fns.structure.pdb_write.sheet() function."""