tests.formats_test package¶
Submodules¶
tests.formats_test.device_test module¶
tests.formats_test.disklabel_test module¶
tests.formats_test.fs_test module¶
-
class
tests.formats_test.fs_test.
AppleBootstrapFSTestCase
(methodName='run_test')¶
-
class
tests.formats_test.fs_test.
BTRFSTestCase
(methodName='run_test')¶
-
class
tests.formats_test.fs_test.
BindFSTestCase
(methodName='run_test')¶
-
class
tests.formats_test.fs_test.
DevPtsFSTestCase
(methodName='run_test')¶
-
class
tests.formats_test.fs_test.
EFIFSTestCase
(methodName='run_test')¶
-
class
tests.formats_test.fs_test.
Ext2FSTestCase
(methodName='run_test')¶
-
class
tests.formats_test.fs_test.
Ext3FSTestCase
(methodName='run_test')¶
-
class
tests.formats_test.fs_test.
Ext4FSTestCase
(methodName='run_test')¶
-
class
tests.formats_test.fs_test.
FATFSTestCase
(methodName='run_test')¶
-
class
tests.formats_test.fs_test.
GFS2TestCase
(methodName='run_test')¶
-
class
tests.formats_test.fs_test.
HFSPlusTestCase
(methodName='run_test')¶
-
class
tests.formats_test.fs_test.
HFSTestCase
(methodName='run_test')¶
-
class
tests.formats_test.fs_test.
Iso9660FS
(methodName='run_test')¶
-
class
tests.formats_test.fs_test.
JFSTestCase
(methodName='run_test')¶
-
class
tests.formats_test.fs_test.
MacEFIFSTestCase
(methodName='run_test')¶
-
class
tests.formats_test.fs_test.
NFSTestCase
(methodName='run_test')¶
-
class
tests.formats_test.fs_test.
NFSv4TestCase
(methodName='run_test')¶
-
class
tests.formats_test.fs_test.
NTFSTestCase
(methodName='run_test')¶
-
class
tests.formats_test.fs_test.
NoDevFSTestCase
(methodName='run_test')¶
-
class
tests.formats_test.fs_test.
ProcFSTestCase
(methodName='run_test')¶
-
class
tests.formats_test.fs_test.
ReiserFSTestCase
(methodName='run_test')¶
-
class
tests.formats_test.fs_test.
ResizeTmpFSTestCase
(methodName='run_test')¶ Bases:
tests.loopbackedtestcase.LoopBackedTestCase
-
setUp
()¶
-
test_resize
()¶
-
test_shrink
()¶
-
-
class
tests.formats_test.fs_test.
SELinuxFSTestCase
(methodName='run_test')¶
-
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')¶
-
class
tests.formats_test.fs_test.
TmpFSTestCase
(methodName='run_test')¶
-
class
tests.formats_test.fs_test.
USBFSTestCase
(methodName='run_test')¶
-
class
tests.formats_test.fs_test.
XFSTestCase
(methodName='run_test')¶
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.fsuuid module¶
-
class
tests.formats_test.fsuuid.
SetUUID
(methodName='run_test')¶ Bases:
tests.loopbackedtestcase.LoopBackedTestCase
Base class for UUID tests without any test methods.
-
setUp
()¶
-
-
class
tests.formats_test.fsuuid.
SetUUIDAfterMkFs
(methodName='run_test')¶ Bases:
tests.formats_test.fsuuid.SetUUID
Tests various aspects of setting an UUID for a filesystem where the native mkfs tool can’t set the UUID.
-
setUp
()¶
-
test_reset_uuid
()¶ Create the filesystem with random UUID and reset it later.
-
test_set_invalid_uuid_later
()¶ Create the filesystem and try to reassign an invalid UUID later.
-
test_set_uuid_later
()¶ Create the filesystem with random UUID and reassign later.
-
-
class
tests.formats_test.fsuuid.
SetUUIDWithMkFs
(methodName='run_test')¶ Bases:
tests.formats_test.fsuuid.SetUUID
Tests various aspects of setting an UUID for a filesystem where the native mkfs tool can set the UUID.
-
test_set_invalid_uuid
()¶ Create the filesystem with an invalid UUID.
-
test_set_uuid
()¶ Create the filesystem with a valid UUID.
-
tests.formats_test.init_test module¶
tests.formats_test.labeling_test module¶
-
class
tests.formats_test.labeling_test.
Ext2FSTestCase
(methodName='run_test')¶
-
class
tests.formats_test.labeling_test.
FATFSTestCase
(methodName='run_test')¶
-
class
tests.formats_test.labeling_test.
HFSPlusTestCase
(methodName='run_test')¶
-
class
tests.formats_test.labeling_test.
HFSTestCase
(methodName='run_test')¶
-
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')¶
-
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')¶
-
class
tests.formats_test.labeling_test.
ReiserFSTestCase
(methodName='run_test')¶
-
class
tests.formats_test.labeling_test.
XFSTestCase
(methodName='run_test')¶
tests.formats_test.luks_test module¶
tests.formats_test.methods_test module¶
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='runTest')¶ Bases:
unittest.case.TestCase
Testing SELinux contexts.
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.
-
exec_mount_selinux_format
(formt, *args)¶ Test of correct selinux context parameter value when mounting
-
setUp
()¶
-
test_mount_selinux_ext2fs
()¶ Test of correct selinux context parameter value when mounting ext2
-
test_mount_selinux_xfs
()¶ Test of correct selinux context parameter value when mounting XFS
-
tests.formats_test.uuid_test module¶
-
class
tests.formats_test.uuid_test.
Ext2FSAfterTestCase
(methodName='run_test')¶
-
class
tests.formats_test.uuid_test.
Ext2FSTestCase
(methodName='run_test')¶
-
class
tests.formats_test.uuid_test.
FATFSTestCase
(methodName='run_test')¶
-
class
tests.formats_test.uuid_test.
HFSPlusTestCase
(methodName='run_test')¶
-
class
tests.formats_test.uuid_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_generate_new_uuid
()¶ Test that newly generated UUIDs are considered valid
-
test_uuids
()¶ Initialize some filesystems with valid and invalid UUIDs.
-
-
class
tests.formats_test.uuid_test.
JFSTestCase
(methodName='run_test')¶
-
class
tests.formats_test.uuid_test.
NTFSTestCase
(methodName='run_test')¶
-
class
tests.formats_test.uuid_test.
ReiserFSAfterTestCase
(methodName='run_test')¶
-
class
tests.formats_test.uuid_test.
ReiserFSTestCase
(methodName='run_test')¶
-
class
tests.formats_test.uuid_test.
SwapSpaceTestCase
(methodName='run_test')¶
-
class
tests.formats_test.uuid_test.
XFSAfterTestCase
(methodName='run_test')¶
-
class
tests.formats_test.uuid_test.
XFSTestCase
(methodName='run_test')¶