Beispiel #1
0
 def vcheck_versionfails_test(self):
     on_version_ind = -1
     self.mockrepo_real(on_version_ind=on_version_ind)
     
     self.assertFalse(vcheck.vcheck(self.mod2check, version=unpresent_version))
Beispiel #2
0
 def vcheck_versionerrors_test(self):
     with self.assertRaisesRegex(vcheck.VersionError, 'Repo for module .* does not match a released version.'):
         vcheck.vcheck(self.mod2check, version=unpresent_version)
Beispiel #3
0
 def vcheck_versionmatches_test(self):
     on_version_ind = -1
     self.mockrepo_real(on_version_ind=on_version_ind)
     
     self.assertTrue(vcheck.vcheck(self.mod2check, version=current_versions[on_version_ind]))
Beispiel #4
0
 def vcheck_hexshafails_test(self):
     self.assertFalse(vcheck.vcheck(self.mod2check, hexsha=unpresent_hexsha))
Beispiel #5
0
 def vcheck_hexshamatches_test(self):
     self.assertTrue(vcheck.vcheck(self.mod2check, hexsha=current_hexsha))
Beispiel #6
0
    def vcheck_notenoughargs_test(self):
        on_version_ind = -1
        self.mockrepo_real(on_version_ind=on_version_ind)

        with self.assertRaisesRegex(ValueError, 'Neither hexsha nor version specified'):
            vcheck.vcheck(self.mod2check)
Beispiel #7
0
    def vcheck_toomanyargs_test(self):
        on_version_ind = -1
        self.mockrepo_real(on_version_ind=on_version_ind)

        with self.assertRaisesRegex(ValueError, 'Only specify either hexsha (.*) or version(.*)'):
            vcheck.vcheck(self.mod2check, hexsha=current_hexshas[on_version_ind] , version=current_versions[on_version_ind])