How to use the inflect.no_classical.keys function in inflect

To help you get started, we’ve selected a few inflect examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jazzband / inflect / tests.py View on Github external
def test_classical(self):
        # classical dicts
        self.assertEqual(set(inflect.def_classical.keys()), set(inflect.all_classical.keys()))
        self.assertEqual(set(inflect.def_classical.keys()), set(inflect.no_classical.keys()))

        # def classical
        p = inflect.engine()
        self.assertEqual(p.classical_dict, inflect.def_classical)

        p.classical()
        self.assertEqual(p.classical_dict, inflect.all_classical)

        p.classical(0)
        self.assertEqual(p.classical_dict, inflect.no_classical)

        p.classical(1)
        self.assertEqual(p.classical_dict, inflect.all_classical)
        
        p.classical(all=0)
        self.assertEqual(p.classical_dict, inflect.no_classical)
github jazzband / inflect / tests / test_pwd.py View on Github external
def test_classical(self):
        # classical dicts
        self.assertEqual(
            set(inflect.def_classical.keys()), set(inflect.all_classical.keys())
        )
        self.assertEqual(
            set(inflect.def_classical.keys()), set(inflect.no_classical.keys())
        )

        # def classical
        p = inflect.engine()
        self.assertEqual(p.classical_dict, inflect.def_classical)

        p.classical()
        self.assertEqual(p.classical_dict, inflect.all_classical)

        self.assertRaises(TypeError, p.classical, 0)
        self.assertRaises(TypeError, p.classical, 1)
        self.assertRaises(TypeError, p.classical, "names")
        self.assertRaises(TypeError, p.classical, "names", "zero")
        self.assertRaises(TypeError, p.classical, "all")

        p.classical(all=False)
github GeneralizedLearningUtilities / SuperGLU / python_module / SuperGLU / Services / TextProcessing / Tests / Inflect / test_pwd.py View on Github external
def test_classical(self):
        # classical dicts
        self.assertEqual(set(inflect.def_classical.keys()), set(inflect.all_classical.keys()))
        self.assertEqual(set(inflect.def_classical.keys()), set(inflect.no_classical.keys()))

        # def classical
        p = inflect.engine()
        self.assertEqual(p.classical_dict, inflect.def_classical)

        p.classical()
        self.assertEqual(p.classical_dict, inflect.all_classical)

        self.assertRaises(TypeError, p.classical, 0)
        self.assertRaises(TypeError, p.classical, 1)
        self.assertRaises(TypeError, p.classical, 'names')
        self.assertRaises(TypeError, p.classical, 'names', 'zero')
        self.assertRaises(TypeError, p.classical, 'all')

        p.classical(all=False)
        self.assertEqual(p.classical_dict, inflect.no_classical)