Commits

Anonymous committed 1e9ce63

Fixed formatting as swap

  • Participants
  • Parent commits c41c8ea

Comments (0)

Files changed (1)

File vinstall/backend/utils.py

     """Create a filesystem in a partition using mkfs.
 
     """
-    assert filesystem in supported_filesystems(), 'Unsupported filesystem'
+    if 'swap' not in filesystem:
+        assert filesystem in supported_filesystems(), 'Unsupported filesystem'
     FSFLAGS = {'reiserfs':'-q -f -f',
         'jfs':'-q',
         'xfs':'-q',
     def test_format_with_unsupported_fs(self):
         self.assertRaises(AssertionError, format_partition,
             self.img, 'foofs')
+    
+    def test_swap(self):
+        format_partition(self.img, 'swap')
+        rformat = subprocess.check_output(['file', self.img])
+        rformat = rformat.strip()
+        self.assertTrue('swap' in rformat.split()[2])