-
-
Notifications
You must be signed in to change notification settings - Fork 212
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add possibility to don't replace non-words by default (#361)
Add possibility to don't replace non-words by default
- Loading branch information
1 parent
d33bf09
commit d7844af
Showing
2 changed files
with
22 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from tests.testcase import BaseTestCase | ||
|
||
class ColumnsNamesTestCase(BaseTestCase): | ||
|
||
def test_columns_names_replace_nonwords(self): | ||
columns = ( | ||
'regular Int64, ' | ||
'CamelCase Int64, ' | ||
'With_Underscores Int64, ' | ||
'Any%different.Column? Int64' | ||
) | ||
|
||
expected_columns = ['regular', 'CamelCase', 'With_Underscores', 'Any%different.Column?'] | ||
|
||
with self.create_table(columns): | ||
df = self.client.query_dataframe('SELECT * FROM test', replace_nonwords=False) | ||
self.assertTrue(expected_columns.equals(list(df.columns))) |