File: data_stream.py

package info (click to toggle)
dfvfs 20240505-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 475,508 kB
  • sloc: python: 36,533; vhdl: 1,922; sh: 448; xml: 52; makefile: 16
file content (34 lines) | stat: -rw-r--r-- 883 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
31
32
33
34
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Tests for the VFS data stream interface."""

import unittest

from dfvfs.vfs import data_stream

from tests import test_lib as shared_test_lib


class DataStreamTest(shared_test_lib.BaseTestCase):
  """Tests the VFS data stream interface."""

  def testName(self):
    """Test the name property."""
    test_data_stream = data_stream.DataStream(None)
    self.assertEqual(test_data_stream.name, '')

  def testGetExtents(self):
    """Test the GetExtents function."""
    test_data_stream = data_stream.DataStream(None)
    extents = test_data_stream.GetExtents()
    self.assertEqual(extents, [])

  def testIsDefault(self):
    """Test the IsDefault function."""
    test_data_stream = data_stream.DataStream(None)
    result = test_data_stream.IsDefault()
    self.assertTrue(result)


if __name__ == '__main__':
  unittest.main()