Skip to content

Commit

Permalink
more styling, string fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tony committed Apr 21, 2017
1 parent 44a9681 commit fce83fb
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tests/test_unihan.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def test_download(tmpdir, mock_zip_file):

process.download(str(mock_zip_file), str(dest_filepath), shutil.copy)

result = os.path.dirname(dest_filepath.join('data'))
result = os.path.dirname(str(dest_filepath.join('data')))
assert result, "Creates data directory if doesn't exist."


Expand Down Expand Up @@ -185,18 +185,18 @@ def test_convert_only_output_requested_columns(tmpdir):

items = process.convert(csv_files, columns)

notInColumns = []
inColumns = ['kDefinition', 'kCantonese'] + process.INDEX_FIELDS
not_in_columns = []
in_columns = ['kDefinition', 'kCantonese'] + process.INDEX_FIELDS

# columns not selected in convert must not be in result.
for v in items[0]:
if v not in columns:
notInColumns.append(v)
not_in_columns.append(v)
else:
inColumns.append(v)
in_columns.append(v)

assert [] == notInColumns, "Convert filters columns not specified."
assert set(inColumns).issubset(set(columns)), (
assert [] == not_in_columns, "Convert filters columns not specified."
assert set(in_columns).issubset(set(columns)), (
"Convert returns correct columns specified + ucn and char."
)

Expand Down

0 comments on commit fce83fb

Please sign in to comment.