X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=tests%2Ftest_srcformats.py;h=4ecaf8b7fcc83925238f2473ed7961714158eee2;hb=4e9d67806b0cf200b68f2a199dd0fdf183b4c6de;hp=2bd527d5bf05a080f79cab6400333979476c7ad3;hpb=fd9038ac91d1ec43828ae4d0f364952aee2de181;p=dak.git diff --git a/tests/test_srcformats.py b/tests/test_srcformats.py index 2bd527d5..4ecaf8b7 100755 --- a/tests/test_srcformats.py +++ b/tests/test_srcformats.py @@ -104,40 +104,6 @@ class FormatTreeQuiltTestCase(SourceFormatTestCase): 'native_tar': 1, }) -## - -class ValidateFormatTestCase(unittest.TestCase): - def assertValid(self, format, **kwargs): - self.fmt.validate_format(format, **kwargs) - - def assertInvalid(self, *args, **kwargs): - self.assertRaises( - UnknownFormatError, - lambda: self.assertValid(*args, **kwargs), - ) - -class ValidateFormatThreeTestCase(ValidateFormatTestCase): - fmt = srcformats.FormatThree - - def testValid(self): - self.assertValid((3, 0, 'native')) - - def testInvalid(self): - self.assertInvalid((1, 0)) - self.assertInvalid((0, 0)) - self.assertInvalid((3, 0, 'quilt')) - -class ValidateFormatThreeQuiltTestCase(ValidateFormatTestCase): - fmt = srcformats.FormatThreeQuilt - - def testValid(self): - self.assertValid((3, 0, 'quilt')) - - def testInvalid(self): - self.assertInvalid((1, 0)) - self.assertInvalid((0, 0)) - self.assertInvalid((3, 0, 'native')) - class FormatFromStringTestCase(unittest.TestCase): def assertFormat(self, txt, klass): self.assertEqual(srcformats.get_format_from_string(txt), klass)