Esempio n. 1
0
 def test_get_import_name_without_alias(self):
     import_name_with_alias = "requests as R"
     expected_import_name_without_alias = "requests"
     import_name_without_aliases = pipreqs.get_name_without_alias(
         import_name_with_alias)
     self.assertEqual(import_name_without_aliases,
                      expected_import_name_without_alias)
Esempio n. 2
0
 def test_get_import_name_without_alias(self):
     import_name_with_alias = "requests as R"
     expected_import_name_without_alias = "requests"
     import_name_without_aliases = pipreqs.get_name_without_alias(
         import_name_with_alias)
     self.assertEqual(
         import_name_without_aliases, expected_import_name_without_alias)
Esempio n. 3
0
 def test_get_import_name_without_alias(self):
     """
     Test that function get_name_without_alias() will work on a string.
     - Note: This isn't truly needed when pipreqs is walking the AST to find imports
     """
     import_name_with_alias = "requests as R"
     expected_import_name_without_alias = "requests"
     import_name_without_aliases = pipreqs.get_name_without_alias(
         import_name_with_alias)
     self.assertEqual(import_name_without_aliases,
                      expected_import_name_without_alias)
Esempio n. 4
0
 def test_get_import_name_without_alias(self):
     """
     Test that function get_name_without_alias() will work on a string.
     - Note: This isn't truly needed when pipreqs is walking the AST to find imports
     """
     import_name_with_alias = "requests as R"
     expected_import_name_without_alias = "requests"
     import_name_without_aliases = pipreqs.get_name_without_alias(
         import_name_with_alias)
     self.assertEqual(
         import_name_without_aliases, expected_import_name_without_alias)