Example #1
0
    def test_unify_quotes_should_avoid_some_cases(self):
        self.assertEqual(
            '''"foo's"''',
            unify.unify_quotes('''"foo's"''', preferred_quote="'"))

        self.assertEqual(
            '''"""foo"""''',
            unify.unify_quotes('''"""foo"""''', preferred_quote="'"))
Example #2
0
    def test_unify_quotes_should_avoid_some_cases(self):
        self.assertEqual('''f"foo's"''',
                         unify.unify_quotes('''f"foo's"''',
                                            preferred_quote="'"))

        self.assertEqual('''f"""foo"""''',
                         unify.unify_quotes('''f"""foo"""''',
                                            preferred_quote="'"))
Example #3
0
    def test_unify_quotes(self):
        self.assertEqual("'foo'",
                         unify.unify_quotes('"foo"', preferred_quote="'"))

        self.assertEqual('"foo"',
                         unify.unify_quotes('"foo"', preferred_quote='"'))

        self.assertEqual('"foo"',
                         unify.unify_quotes("'foo'", preferred_quote='"'))
Example #4
0
    def test_unify_quotes(self):
        self.assertEqual("f'foo'",
                         unify.unify_quotes('f"foo"',
                                            preferred_quote="'"))

        self.assertEqual('f"foo"',
                         unify.unify_quotes('f"foo"',
                                            preferred_quote='"'))

        self.assertEqual('f"foo"',
                         unify.unify_quotes("f'foo'",
                                            preferred_quote='"'))