~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_osutils.py

Minor improvements to log performance by calling outf.write once (only) per revision and tuning date formatting speed

Show diffs side-by-side

added added

removed removed

Lines of Context:
378
378
        # Instead blackbox.test_locale should check for localized
379
379
        # dates once they do occur in output strings.
380
380
 
 
381
    def test_format_date_with_offset_in_original_timezone(self):
 
382
        self.assertEqual("Thu 1970-01-01 00:00:00 +0000",
 
383
            osutils.format_date_with_offset_in_original_timezone(0))
 
384
        self.assertEqual("Fri 1970-01-02 03:46:40 +0000",
 
385
            osutils.format_date_with_offset_in_original_timezone(100000))
 
386
        self.assertEqual("Fri 1970-01-02 05:46:40 +0200",
 
387
            osutils.format_date_with_offset_in_original_timezone(100000, 7200))
 
388
 
381
389
    def test_local_time_offset(self):
382
390
        """Test that local_time_offset() returns a sane value."""
383
391
        offset = osutils.local_time_offset()