Skip to content

Commit

Permalink
test for _pg2dtype
Browse files Browse the repository at this point in the history
  • Loading branch information
michellemho committed Sep 11, 2017
1 parent bbe61ae commit e39f4bc
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/test_context.py
Expand Up @@ -545,3 +545,18 @@ def test_dtypes2pg(self):
for i in results:
result = _dtypes2pg(i)
self.assertEqual (result, results[i])

def test_pg2dtypes(self):
"""context._pg2dtypes"""
from cartoframes.context import _pg2dtypes
results = {
'date': 'datetime64[ns]',
'number': 'float64',
'string': 'object',
'boolean': 'bool',
'geometry': 'object',
'unknown_pgdata': 'object'
}
for i in results:
result = _pg2dtypes(i)
self.assertEqual (result, results[i])

0 comments on commit e39f4bc

Please sign in to comment.