Ejemplo n.º 1
0
    def test_unicode_license(self):
        """invalid_license uses unicode copyright and multiline years.

        Where copyright is ©.
        """
        errors = check_license(self.invalid_license, year=2014)
        assert_that(errors, is_not(has_item("25: L101 copyright is missing")))
Ejemplo n.º 2
0
 def test_outdated_license(self):
     """valid_license has an outdated license."""
     errors = check_license(self.valid_license, year=2015)
     assert_that(
         errors,
         has_item("5: L102 copyright year is outdated, "
                  "expected 2015 but got 2014"))
Ejemplo n.º 3
0
    def test_unicode_license(self):
        """invalid_license uses unicode copyright and multiline years.

        Where copyright is ©.
        """
        errors = check_license(self.invalid_license, year=2014)
        assert_that(errors, is_not(has_item("25: L101 copyright is missing")))
Ejemplo n.º 4
0
 def test_empty(self):
     """empty files like __init__ are skipped"""
     errors = check_license(self.empty)
     assert_that(errors, has_length(0))
Ejemplo n.º 5
0
 def test_license_css(self):
     """license.css has a well formatted license."""
     errors = check_license(self.license_css, year=2014, python_style=False)
     assert_that(errors, has_length(0))
Ejemplo n.º 6
0
 def test_license_jinja(self):
     """license.html has a well formatted license."""
     errors = check_license(self.license_html, year=2014)
     assert_that(errors, has_length(0))
Ejemplo n.º 7
0
 def test_missing(self):
     """missing_license has only the copyright"""
     errors = check_license(self.missing_license, year=2015)
     assert_that(errors, has_item("13: L100 license is missing"))
Ejemplo n.º 8
0
 def test_license(self):
     """valid_license has a well formatted license."""
     errors = check_license(self.valid_license, year=2014)
     assert_that(errors, has_length(0))
Ejemplo n.º 9
0
 def test_doesnt_look_like_gnu_gpl(self):
     """invalid_license doesn't look like the GNU GPL"""
     errors = check_license(self.invalid_license, year=2014)
     assert_that(errors, has_item("25: L103 license is not GNU GPLv2"))
Ejemplo n.º 10
0
 def test_doesnt_look_like_gnu_gpl(self):
     """invalid_license doesn't look like the GNU GPL"""
     errors = check_license(self.invalid_license, year=2014)
     assert_that(errors, has_item("25: L103 license is not GNU GPLv2"))
Ejemplo n.º 11
0
 def test_no_copyright(self):
     """copyright is missing"""
     errors = check_license(self.valid)
     assert_that(errors, has_item("25: L101 copyright is missing"))
Ejemplo n.º 12
0
 def test_empty(self):
     """empty files like __init__ are skipped"""
     errors = check_license(self.empty)
     assert_that(errors, has_length(0))
Ejemplo n.º 13
0
 def test_license_css(self):
     """license.css has a well formatted license."""
     errors = check_license(self.license_css, year=2014, python_style=False)
     assert_that(errors, has_length(0))
Ejemplo n.º 14
0
 def test_license_jinja(self):
     """license.html has a well formatted license."""
     errors = check_license(self.license_html, year=2014)
     assert_that(errors, has_length(0))
Ejemplo n.º 15
0
 def test_missing(self):
     """missing_license has only the copyright"""
     errors = check_license(self.missing_license)
     assert_that(errors, has_item("13: L100 license is missing"))
Ejemplo n.º 16
0
 def test_no_copyright(self):
     """copyright is missing"""
     errors = check_license(self.valid)
     assert_that(errors, has_item("25: L101 copyright is missing"))
Ejemplo n.º 17
0
 def test_outdated_license(self):
     """valid_license has an outdated license."""
     errors = check_license(self.valid_license, year=2015)
     assert_that(errors, has_item("5: L102 copyright year is outdated, "
                                  "expected 2015 but got 2014"))
Ejemplo n.º 18
0
 def test_badly_encoded_file(self):
     errors = check_license(self.cp1252, year=2014)
     assert_that(errors,
                 has_item("24: L190 file cannot be decoded as utf-8"))
Ejemplo n.º 19
0
 def test_badly_encoded_file(self):
     errors = check_license(self.cp1252, year=2014)
     assert_that(errors,
                 has_item("24: L190 file cannot be decoded as utf-8"))
Ejemplo n.º 20
0
 def test_license(self):
     """valid_license has a well formatted license."""
     errors = check_license(self.valid_license, year=2014)
     assert_that(errors, has_length(0))