示例#1
0
    def test_invalid_module_id(self):
        id = '/jquery/a.js'

        try:
            module.parse_module_id(id)
        except Exception:
            error = True

        self.assertEqual(error, True)
示例#2
0
    def test_invalid_module_id(self):
        id = '/jquery/a.js'

        try:
            module.parse_module_id(id)
        except Exception:
            error = True

        self.assertEqual(error, True)
示例#3
0
    def test_parse_module_id_name_version_path(self):
        id = '[email protected]/a.js'
        name, version, path = module.parse_module_id(id)

        self.assertEqual(name, 'jquery')
        self.assertEqual(version, '1.0.0')
        self.assertEqual(path, '/a.js')

        id = '[email protected]/'
        name, version, path = module.parse_module_id(id)

        self.assertEqual(name, 'jquery')
        self.assertEqual(version, '1.0.0')
        self.assertEqual(path, '')
示例#4
0
    def test_parse_module_id_name_version_path(self):
        id = '[email protected]/a.js'
        name, version, path = module.parse_module_id(id)

        self.assertEqual(name, 'jquery')
        self.assertEqual(version, '1.0.0')
        self.assertEqual(path, '/a.js')

        id = '[email protected]/'
        name, version, path = module.parse_module_id(id)

        self.assertEqual(name, 'jquery')
        self.assertEqual(version, '1.0.0')
        self.assertEqual(path, '')
示例#5
0
    def test_parse_module_id_name(self):
        id = 'jquery'
        name, version, path = module.parse_module_id(id)

        self.assertEqual(name, 'jquery')
        self.assertEqual(version, '*')
        self.assertEqual(path, '')
示例#6
0
    def test_parse_module_id_name(self):
        id = 'jquery'
        name, version, path = module.parse_module_id(id)

        self.assertEqual(name, 'jquery')
        self.assertEqual(version, '*')
        self.assertEqual(path, '')