tests.formats_test package

Submodules

tests.formats_test.device_test module

class tests.formats_test.device_test.DeviceFormatTestCase(methodName='runTest')

Bases: unittest.case.TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

test_formats()
class tests.formats_test.device_test.DeviceValueTestCase(methodName='runTest')

Bases: unittest.case.TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

test_value()

tests.formats_test.disklabel_test module

class tests.formats_test.disklabel_test.DiskLabelTestCase(methodName='runTest')

Bases: unittest.case.TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

test_get_alignment()

tests.formats_test.fs_test module

class tests.formats_test.fs_test.AppleBootstrapFSTestCase(methodName='run_test')

Bases: tests.formats_test.fs_test.HFSTestCase

class tests.formats_test.fs_test.BTRFSTestCase(methodName='run_test')

Bases: tests.formats_test.fstesting.FSAsRoot

class tests.formats_test.fs_test.BindFSTestCase(methodName='run_test')

Bases: tests.formats_test.fstesting.FSAsRoot

class tests.formats_test.fs_test.DevPtsFSTestCase(methodName='run_test')

Bases: tests.formats_test.fs_test.NoDevFSTestCase

class tests.formats_test.fs_test.EFIFSTestCase(methodName='run_test')

Bases: tests.formats_test.fs_test.FATFSTestCase

class tests.formats_test.fs_test.Ext2FSTestCase(methodName='run_test')

Bases: tests.formats_test.fstesting.FSAsRoot

class tests.formats_test.fs_test.Ext3FSTestCase(methodName='run_test')

Bases: tests.formats_test.fs_test.Ext2FSTestCase

class tests.formats_test.fs_test.Ext4FSTestCase(methodName='run_test')

Bases: tests.formats_test.fs_test.Ext3FSTestCase

class tests.formats_test.fs_test.FATFSTestCase(methodName='run_test')

Bases: tests.formats_test.fstesting.FSAsRoot

class tests.formats_test.fs_test.GFS2TestCase(methodName='run_test')

Bases: tests.formats_test.fstesting.FSAsRoot

class tests.formats_test.fs_test.HFSPlusTestCase(methodName='run_test')

Bases: tests.formats_test.fstesting.FSAsRoot

class tests.formats_test.fs_test.HFSTestCase(methodName='run_test')

Bases: tests.formats_test.fstesting.FSAsRoot

class tests.formats_test.fs_test.Iso9660FS(methodName='run_test')

Bases: tests.formats_test.fstesting.FSAsRoot

class tests.formats_test.fs_test.JFSTestCase(methodName='run_test')

Bases: tests.formats_test.fstesting.FSAsRoot

class tests.formats_test.fs_test.MacEFIFSTestCase(methodName='run_test')

Bases: tests.formats_test.fs_test.HFSPlusTestCase

class tests.formats_test.fs_test.NFSTestCase(methodName='run_test')

Bases: tests.formats_test.fstesting.FSAsRoot

class tests.formats_test.fs_test.NFSv4TestCase(methodName='run_test')

Bases: tests.formats_test.fs_test.NFSTestCase

class tests.formats_test.fs_test.NTFSTestCase(methodName='run_test')

Bases: tests.formats_test.fstesting.FSAsRoot

class tests.formats_test.fs_test.NoDevFSTestCase(methodName='run_test')

Bases: tests.formats_test.fstesting.FSAsRoot

class tests.formats_test.fs_test.ProcFSTestCase(methodName='run_test')

Bases: tests.formats_test.fs_test.NoDevFSTestCase

class tests.formats_test.fs_test.ReiserFSTestCase(methodName='run_test')

Bases: tests.formats_test.fstesting.FSAsRoot

class tests.formats_test.fs_test.ResizeTmpFSTestCase(methodName='run_test')

Bases: tests.loopbackedtestcase.LoopBackedTestCase

setUp()
tearDown()
test_resize()
test_shrink()
class tests.formats_test.fs_test.SELinuxFSTestCase(methodName='run_test')

Bases: tests.formats_test.fs_test.NoDevFSTestCase

class tests.formats_test.fs_test.SimpleTmpFSTestCase(methodName='run_test')

Bases: tests.loopbackedtestcase.LoopBackedTestCase

test_simple()
class tests.formats_test.fs_test.SysFSTestCase(methodName='run_test')

Bases: tests.formats_test.fs_test.NoDevFSTestCase

class tests.formats_test.fs_test.TmpFSTestCase(methodName='run_test')

Bases: tests.formats_test.fs_test.NoDevFSTestCase

class tests.formats_test.fs_test.USBFSTestCase(methodName='run_test')

Bases: tests.formats_test.fs_test.NoDevFSTestCase

class tests.formats_test.fs_test.XFSTestCase(methodName='run_test')

Bases: tests.formats_test.fstesting.FSAsRoot

tests.formats_test.fslabeling module

class tests.formats_test.fslabeling.CompleteLabelingAsRoot(methodName='run_test')

Bases: tests.formats_test.fslabeling.LabelingAsRoot

Tests where it is possible to read the label and to relabel an existing filesystem.

test_creating()

Create the filesystem when passing a valid label. Verify that the filesystem has that label.

test_creating_empty()

Create a filesystem with an empty label. Verify that the filesystem has the empty label.

test_creating_none()

Create a filesystem with the label None. Verify that the filesystem has the default label.

test_labeling()

A sequence of tests of filesystem labeling.

  • create the filesystem when passing an invalid label and verify that the filesystem has the default label
  • relabel the filesystem with a valid label and verify that the filesystem has that label
  • relabel the filesystem with an empty label and verify that the filesystem has that label
  • raise an exception when relabeling when None is specified
  • raise an exception when relabeling with an invalid label
class tests.formats_test.fslabeling.LabelingAsRoot(methodName='run_test')

Bases: tests.loopbackedtestcase.LoopBackedTestCase

Tests various aspects of labeling a filesystem where there is no easy way to read the filesystem’s label once it has been set and where the filesystem can not be relabeled.

setUp()
test_creating()

Create the filesystem when passing a valid label

test_creating_empty()

Create the filesystem when passing the empty label.

test_creating_none()

Create the filesystem when passing None (indicates filesystem default)

test_labeling()

A sequence of tests of filesystem labeling.

  • create the filesystem when passing an invalid label
  • raise an exception when reading the filesystem
  • raise an exception when relabeling the filesystem
class tests.formats_test.fslabeling.LabelingWithRelabeling(methodName='run_test')

Bases: tests.formats_test.fslabeling.LabelingAsRoot

Tests labeling where it is possible to relabel.

test_labeling()

A sequence of tests of filesystem labeling.

  • create the filesystem when passing an invalid label
  • raise an exception when reading the filesystem
  • relabel the filesystem with a valid label
  • relabel the filesystem with an empty label
  • raise an exception when relabeling when None is specified
  • raise an exception when relabeling with an invalid label

tests.formats_test.fstesting module

class tests.formats_test.fstesting.FSAsRoot(methodName='run_test')

Bases: tests.loopbackedtestcase.LoopBackedTestCase

test_creation()
test_instantiation()
test_labeling()
test_mounting()
test_mountpoint()
test_no_explicit_target_size()

Because _target_size has not been set, resize sets to min size.

test_no_explicit_target_size2()

Because _target_size has been set to size in constructor the resize action resizes filesystem to that size.

test_relabeling()
test_resize()
test_shrink()
test_too_big()
test_too_big2()
test_too_small()
tests.formats_test.fstesting.can_resize(an_fs)

Returns True if this filesystem has all necessary resizing tools available.

Parameters:an_fs – a filesystem object

tests.formats_test.init_test module

class tests.formats_test.init_test.FormatsTestCase(methodName='runTest')

Bases: unittest.case.TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

test_formats_methods()

tests.formats_test.labeling_test module

class tests.formats_test.labeling_test.Ext2FSTestCase(methodName='run_test')

Bases: tests.formats_test.fslabeling.CompleteLabelingAsRoot

class tests.formats_test.labeling_test.FATFSTestCase(methodName='run_test')

Bases: tests.formats_test.fslabeling.CompleteLabelingAsRoot

class tests.formats_test.labeling_test.HFSPlusTestCase(methodName='run_test')

Bases: tests.formats_test.fslabeling.LabelingAsRoot

class tests.formats_test.labeling_test.HFSTestCase(methodName='run_test')

Bases: tests.formats_test.fslabeling.LabelingAsRoot

class tests.formats_test.labeling_test.InitializationTestCase(methodName='runTest')

Bases: unittest.case.TestCase

Test FS object initialization.

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

test_labels()

Initialize some filesystems with valid and invalid labels.

class tests.formats_test.labeling_test.JFSTestCase(methodName='run_test')

Bases: tests.formats_test.fslabeling.LabelingWithRelabeling

class tests.formats_test.labeling_test.LabelingSwapSpaceTestCase(methodName='run_test', device_spec=None, block_size=None)

Bases: tests.loopbackedtestcase.LoopBackedTestCase

LoopBackedTestCase manages loop devices.

It constructs loop devices according to loop_device_spec, sets them up, and tears them down again.

Parameters:
  • device_spec (list of Size or NoneType) – list containing the size of each loop device
  • block_size (Size or NoneType) – block size for dd command when making devices
test_creating_swap_space_empty()
test_creating_swap_space_none()
test_labeling()
class tests.formats_test.labeling_test.NTFSTestCase(methodName='run_test')

Bases: tests.formats_test.fslabeling.CompleteLabelingAsRoot

class tests.formats_test.labeling_test.ReiserFSTestCase(methodName='run_test')

Bases: tests.formats_test.fslabeling.LabelingWithRelabeling

class tests.formats_test.labeling_test.XFSTestCase(methodName='run_test')

Bases: tests.formats_test.fslabeling.CompleteLabelingAsRoot

tests.formats_test.luks_test module

class tests.formats_test.luks_test.LUKSTestCase(methodName='run_test')

Bases: tests.loopbackedtestcase.LoopBackedTestCase

test_resize()
test_size()

tests.formats_test.misc_test module

class tests.formats_test.misc_test.FSOverheadTestCase(methodName='runTest')

Bases: unittest.case.TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

test_biggest_overhead_FS()
test_required_size_FS()

tests.formats_test.selinux_test module

class tests.formats_test.selinux_test.SELinuxContextTestCase(methodName='run_test')

Bases: tests.loopbackedtestcase.LoopBackedTestCase

Testing SELinux contexts.

setUp()
tearDown()
test_mounting_ext2fs()

Test that lost+found directory gets assigned correct SELinux context if installer_mode is True, and retains some random old context if installer_mode is False.

test_mounting_xfs()

XFS does not have a lost+found directory.

Module contents