Esempio n. 1
0
 def test_non_identification(self):
     r = TargetResolver(self.config)
     caught = False
     try:
         r.identify('foo')
     except TargetNotFoundError:
         caught = True
     assert (caught)
Esempio n. 2
0
 def test_non_identification(self):
     r = TargetResolver(self.config)
     caught = False
     try:
         r.identify('foo')
     except TargetNotFoundError:
         caught = True
     assert(caught)
Esempio n. 3
0
 def test_adapter_identification(self):
     r = TargetResolver(self.config)
     assert({
         'type': 'package',
         'path': P('r')/'adapters'/'p1'
     } == r.identify('p1'))
Esempio n. 4
0
 def test_group_identification(self):
     r = TargetResolver(self.config)
     assert({
         'type': 'group',
         'path': P('r')/'groups'/'gr1'
     } == r.identify('gr1'))
Esempio n. 5
0
 def test_non_identification(self):
     r = TargetResolver(self.config)
     with self.assertRaises(TargetNotFoundError):
         r.identify('foo')
Esempio n. 6
0
 def test_pkg_identification(self):
     r = TargetResolver(self.config)
     assert(Identification('pkg_config', None, 'bar') == r.identify('foo'))
Esempio n. 7
0
 def test_cmake_identification(self):
     r = TargetResolver(self.config)
     assert(Identification('cmake', P('t2')) == r.identify('t2'))
Esempio n. 8
0
 def test_thirdparty_cmake_identification(self):
     r = TargetResolver(self.config)
     assert(Identification('cmake', P('r')/'thirdparty'/'t1') == \
                                                           r.identify('t1'))
Esempio n. 9
0
 def test_adapter_identification(self):
     r = TargetResolver(self.config)
     assert ({
         'type': 'package',
         'path': P('r') / 'adapters' / 'p1'
     } == r.identify('p1'))
Esempio n. 10
0
 def test_group_identification(self):
     r = TargetResolver(self.config)
     assert(Identification('group', P('r')/'groups'/'gr1') == \
                                                          r.identify('gr1'))
Esempio n. 11
0
 def test_custom_standalone_identification(self):
     r = TargetResolver(self.config)
     assert(Identification('package', P('r')/'adapters'/'p4') == \
                                                           r.identify('p4'))
Esempio n. 12
0
 def test_standalone_identification(self):
     r = TargetResolver(self.config)
     assert(Identification('package', P('r')/'standalones'/'p1') == \
                                                           r.identify('p1'))
Esempio n. 13
0
 def test_application_identification(self):
     r = TargetResolver(self.config)
     assert(Identification('application', P('r')/'applications'/'app1') == \
                                                         r.identify('app1'))
Esempio n. 14
0
 def test_cmake_identification(self):
     r = TargetResolver(self.config)
     assert ({
         'type': 'cmake',
         'path': P('r') / 'thirdparty' / 't1'
     } == r.identify('t1'))
Esempio n. 15
0
 def test_cmake_identification(self):
     r = TargetResolver(self.config)
     assert({
         'type': 'cmake',
         'path': P('r')/'thirdparty'/'t1'
     } == r.identify('t1'))
Esempio n. 16
0
 def test_adapter_identification(self):
     r = TargetResolver(self.config)
     assert(Identification('package', P('r')/'adapters'/'p1') == \
                                                           r.identify('p1'))
Esempio n. 17
0
 def test_group_identification(self):
     r = TargetResolver(self.config)
     assert ({
         'type': 'group',
         'path': P('r') / 'groups' / 'gr1'
     } == r.identify('gr1'))