(self, connection)
| 1728 | |
| 1729 | @testing.requires.unicode_connections |
| 1730 | def test_basic(self, connection): |
| 1731 | # the 'convert_unicode' should not get in the way of the |
| 1732 | # reflection process. reflect_table for oracle, postgresql |
| 1733 | # (others?) expect non-unicode strings in result sets/bind |
| 1734 | # params |
| 1735 | |
| 1736 | names = {rec[0] for rec in self.names} |
| 1737 | |
| 1738 | reflected = set(inspect(connection).get_table_names()) |
| 1739 | |
| 1740 | if not names.issubset(reflected) and hasattr(unicodedata, "normalize"): |
| 1741 | # Python source files in the utf-8 coding seem to |
| 1742 | # normalize literals as NFC (and the above are |
| 1743 | # explicitly NFC). Maybe this database normalizes NFD |
| 1744 | # on reflection. |
| 1745 | |
| 1746 | nfc = {unicodedata.normalize("NFC", n) for n in names} |
| 1747 | self.assert_(nfc == names) |
| 1748 | |
| 1749 | # Yep. But still ensure that bulk reflection and |
| 1750 | # create/drop work with either normalization. |
| 1751 | |
| 1752 | r = MetaData() |
| 1753 | r.reflect(connection) |
| 1754 | r.drop_all(connection, checkfirst=False) |
| 1755 | r.create_all(connection, checkfirst=False) |
| 1756 | |
| 1757 | @testing.requires.unicode_connections |
| 1758 | def test_get_names(self, connection): |
nothing calls this directly
no test coverage detected