Exemplo n.º 1
0
  def test_package_path(self):
    self.assertEqual(os.path.join('com', 'pants', 'example', 'tests'),
                     AaptGen.package_path('com.pants.example.tests'))

    with self.assertRaises(AssertionError):
      self.assertEqual(os.path.join('com', 'pants', 'example', 'tests'),
                       AaptGen.package_path('com.pants-example.tests'))

    with self.assertRaises(AssertionError):
      self.assertEqual(os.path.join('com', 'pants', 'example', 'tests'),
                       AaptGen.package_path('com.pants.example'))
Exemplo n.º 2
0
  def test_package_path(self):
    self.assertEqual(os.path.join('com', 'pants', 'example', 'tests'),
                     AaptGen.package_path('com.pants.example.tests'))

    with self.assertRaises(AssertionError):
      self.assertEqual(os.path.join('com', 'pants', 'example', 'tests'),
                       AaptGen.package_path('com.pants-example.tests'))

    with self.assertRaises(AssertionError):
      self.assertEqual(os.path.join('com', 'pants', 'example', 'tests'),
                       AaptGen.package_path('com.pants.example'))