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="'"))
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="'"))
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='"'))
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='"'))