INNER CODE UNIT · Python

test_mismatched_base_still_fails

sun-jiao/flut-renamer · packaging/test_release_version.py:17

    def test_mismatched_base_still_fails(self):
        with self.assertRaisesRegex(ValueError, 'does not match'):
            validate_version('v1.6.4-test', 'version: 1.6.3+18\n')

    def test_invalid_tags_fail(self):
        for tag in ['1.6.3', 'v1.6', 'v1x6x3', 'v1.6.3-', 'v1.6.3-test..1',
                    'v1.6.3-test/1', 'v1.6.3-test\n', 'v1.6.3-"']:
            with self.subTest(tag=tag), self.assertRaises(ValueError):
                parse_tag(tag)

    def test_missing_pubspec_version_fails(self):
        with self.assertRaisesRegex(ValueError, 'Cannot read'):
            validate_version('v1.6.3', 'name: app\n')

    def test_cli_for_reported_release_tag(self):
        root = Path(__file__).resolve().parent.parent
        with tempfile.TemporaryDirectory() as directory:
            pubspec = Path(directory) / 'pubspec.yaml'

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…