/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/tests/test_dirstate.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-22 00:56:52 UTC
  • mfrom: (6621.2.26 py3_pokes)
  • Revision ID: jelmer@jelmer.uk-20170522005652-yjahcr9hwmjkno7n
Merge Python3 porting work ('py3 pokes')

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
import os
20
20
import tempfile
21
21
 
22
 
from breezy import (
 
22
from .. import (
23
23
    controldir,
24
24
    dirstate,
25
25
    errors,
31
31
    tests,
32
32
    workingtree_4,
33
33
    )
34
 
from breezy.tests import (
 
34
from . import (
35
35
    features,
36
36
    test_osutils,
37
37
    )
38
 
from breezy.tests.scenarios import load_tests_apply_scenarios
 
38
from .scenarios import load_tests_apply_scenarios
39
39
 
40
40
 
41
41
# TODO:
1864
1864
        self.assertEqual(expected, dirstate.pack_stat(stat_value))
1865
1865
 
1866
1866
    def test_pack_stat_int(self):
1867
 
        st = _FakeStat(6859L, 1172758614, 1172758617, 777L, 6499538L, 0100644)
 
1867
        st = _FakeStat(6859, 1172758614, 1172758617, 777, 6499538, 0o100644)
1868
1868
        # Make sure that all parameters have an impact on the packed stat.
1869
1869
        self.assertPackStat('AAAay0Xm4FZF5uBZAAADCQBjLNIAAIGk', st)
1870
 
        st.st_size = 7000L
 
1870
        st.st_size = 7000
1871
1871
        #                ay0 => bWE
1872
1872
        self.assertPackStat('AAAbWEXm4FZF5uBZAAADCQBjLNIAAIGk', st)
1873
1873
        st.st_mtime = 1172758620
1876
1876
        st.st_ctime = 1172758630
1877
1877
        #                          uBZ => uBm
1878
1878
        self.assertPackStat('AAAbWEXm4FxF5uBmAAADCQBjLNIAAIGk', st)
1879
 
        st.st_dev = 888L
 
1879
        st.st_dev = 888
1880
1880
        #                                DCQ => DeA
1881
1881
        self.assertPackStat('AAAbWEXm4FxF5uBmAAADeABjLNIAAIGk', st)
1882
 
        st.st_ino = 6499540L
 
1882
        st.st_ino = 6499540
1883
1883
        #                                     LNI => LNQ
1884
1884
        self.assertPackStat('AAAbWEXm4FxF5uBmAAADeABjLNQAAIGk', st)
1885
 
        st.st_mode = 0100744
 
1885
        st.st_mode = 0o100744
1886
1886
        #                                          IGk => IHk
1887
1887
        self.assertPackStat('AAAbWEXm4FxF5uBmAAADeABjLNQAAIHk', st)
1888
1888
 
1892
1892
        Make sure we don't get warnings or errors, and that we ignore changes <
1893
1893
        1s
1894
1894
        """
1895
 
        st = _FakeStat(7000L, 1172758614.0, 1172758617.0,
1896
 
                       777L, 6499538L, 0100644)
 
1895
        st = _FakeStat(7000, 1172758614.0, 1172758617.0,
 
1896
                       777, 6499538, 0o100644)
1897
1897
        # These should all be the same as the integer counterparts
1898
1898
        self.assertPackStat('AAAbWEXm4FZF5uBZAAADCQBjLNIAAIGk', st)
1899
1899
        st.st_mtime = 1172758620.0