Changeset 1835:85cbeb115959


Ignore:
Timestamp:
Jul 10, 2019, 11:24:16 PM (5 months ago)
Author:
Stefan Schwarzer <sschwarzer@…>
Branch:
default
Message:
Use only `0o...` format for octal constants

I guess the variant with `0...` was a leftover for an earlier Python
version that (at least presumably) didn't understand the `0o...`
format.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/test_stat.py

    r1834 r1835  
    406406        stat_result = self.stat._lstat("/home/sschwarzer/index.html")
    407407        # Second form is needed for Python 3
    408         assert oct(stat_result.st_mode) in ("0100644", "0o100644")
     408        assert oct(stat_result.st_mode) == "0o100644"
    409409        assert stat_result.st_size == 4604
    410410        assert stat_result._st_mtime_precision == 60
     
    420420        stat_result = self.stat._lstat("/home/sschwarzer/scios2")
    421421        # Second form is needed for Python 3
    422         assert oct(stat_result.st_mode) in ("042755", "0o42755")
     422        assert oct(stat_result.st_mode) == "0o42755"
    423423        assert stat_result.st_ino is None
    424424        assert stat_result.st_dev is None
Note: See TracChangeset for help on using the changeset viewer.