Esempio n. 1
0
    def test_local_version_exception(self):
        """ Package.local_version() exception test """

        Config.params['cfg'] = 'wrong.cfg'
        with self.assertRaises(PackageError) as context:
            Package.local_version()
            self.assertTrue(PackageError == context.expected)
Esempio n. 2
0
 def test_update_exception(self):
     """ Package.update() exception test """
     Config.params['cvsupdate'] = 'wrongcvs'
     with self.assertRaises(PackageError) as context:
         Package.update()
         self.assertTrue(PackageError == context.expected)
     Config.params['cvsupdate'] = '/usr/bin/git pull origin master'
Esempio n. 3
0
    def test_local_version(self):
        """ Package.local_version() test """

        Config.params['cfg'] = 'setup.cfg'
        actual = FileSystem.readcfg('setup.cfg').get('info', 'version')
        expected = Package.local_version()
        self.assertEqual(actual, expected)
Esempio n. 4
0
    def test_version(self):
        """ Package.version() test """

        Config.params['cfg'] = 'setup.cfg'
        expected = Package.version()
        self.assertIsNotNone(expected)
        self.assertIs(type(expected), str)
Esempio n. 5
0
    def test_update_windows(self):
        """ Package.update() test """

        Config.params['cfg'] = 'setup.cfg'
        Config.params['update'] = '{status}'
        setattr(sys, 'is_windows', True)
        expected = Package.update()
        self.assertIsNotNone(expected)
Esempio n. 6
0
    def test_update_unix(self):
        """ Package.update() unix test """

        Config.params['cfg'] = 'setup.cfg'
        Config.params['update'] = '{status}'
        expected = Package.update()
        self.assertIsNotNone(expected)
        self.assertIs(type(expected), str)
Esempio n. 7
0
    def test_examples(self):
        """ Package.examples() test """

        expected = Package.examples()
        self.assertIsNotNone(expected)
        self.assertIs(type(expected), str)
Esempio n. 8
0
    def test_check_interpreter(self):
        """ Package.check_interpreter() test """

        expected = Package.check_interpreter()
        self.assertTrue(expected)
Esempio n. 9
0
    def test_examples(self):
        """ Package.examples() test """

        expected = Package.examples()
        self.assertIsNotNone(expected)
        self.assertIs(type(expected), str)
Esempio n. 10
0
    def test_check_interpreter(self):
        """ Package.check_interpreter() test """

        expected = Package.check_interpreter()
        self.assertTrue(expected)
Esempio n. 11
0
    def test_update_exception(self):
        """ Package.update() exception test """

        with self.assertRaises(PackageError) as context:
            Package.update()
            self.assertTrue(PackageError == context.expected)