File: test_lib.py

package info (click to toggle)
dfvfs 20160918-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 96,408 kB
  • ctags: 2,759
  • sloc: python: 22,682; makefile: 57; vhdl: 25; sh: 16
file content (30 lines) | stat: -rw-r--r-- 781 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# -*- coding: utf-8 -*-
"""Shared test cases."""

from dfvfs.path import path_spec

from tests import test_lib as shared_test_lib


class TestPathSpec(path_spec.PathSpec):
  """Test path specification."""

  _IS_SYSTEM_LEVEL = True
  TYPE_INDICATOR = u'TEST'

  def __init__(self, **kwargs):
    """Initializes the path specification object."""
    super(TestPathSpec, self).__init__(parent=None, **kwargs)

  @property
  def comparable(self):
    """Comparable representation of the path specification."""
    return self._GetComparable()


class PathSpecTestCase(shared_test_lib.BaseTestCase):
  """The unit test case for path specification implementions."""

  def setUp(self):
    """Sets up the needed objects used throughout the test."""
    self._path_spec = TestPathSpec()