Changeset View
Changeset View
Standalone View
Standalone View
swh/model/tests/test_from_disk.py
# Copyright (C) 2017 The Software Heritage developers | # Copyright (C) 2017 The Software Heritage developers | ||||
# See the AUTHORS file at the top-level directory of this distribution | # See the AUTHORS file at the top-level directory of this distribution | ||||
# License: GNU General Public License version 3, or any later version | # License: GNU General Public License version 3, or any later version | ||||
# See top-level LICENSE file for more information | # See top-level LICENSE file for more information | ||||
import os | import os | ||||
import tarfile | import tarfile | ||||
import tempfile | import tempfile | ||||
import unittest | import unittest | ||||
from nose.plugins.attrib import attr | from nose.plugins.attrib import attr | ||||
from swh.model import from_disk | from swh.model import from_disk | ||||
from swh.model.from_disk import Content, Directory, DentryPerms | from swh.model.from_disk import Content, DentryPerms, Directory | ||||
from swh.model.hashutil import DEFAULT_ALGORITHMS, hash_to_bytes, hash_to_hex | from swh.model.hashutil import DEFAULT_ALGORITHMS, hash_to_bytes, hash_to_hex | ||||
TEST_DATA = os.path.join(os.path.dirname(__file__), 'data') | TEST_DATA = os.path.join(os.path.dirname(__file__), 'data') | ||||
class ModeToPerms(unittest.TestCase): | class ModeToPerms(unittest.TestCase): | ||||
def setUp(self): | def setUp(self): | ||||
super().setUp() | super().setUp() | ||||
# Generate a full permissions map | # Generate a full permissions map | ||||
▲ Show 20 Lines • Show All 763 Lines • Show Last 20 Lines |