Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions pandas/tests/io/test_stata.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
StataMissingValue,
StataReader,
StataWriterUTF8,
ValueLabelTypeMismatch,
read_stata,
)

Expand Down Expand Up @@ -435,7 +436,7 @@ def test_read_write_dta11(self):
formatted = formatted.astype(np.int32)

with tm.ensure_clean() as path:
with tm.assert_produces_warning(io.stata.InvalidColumnName):
with tm.assert_produces_warning(InvalidColumnName):
original.to_stata(path, None)

written_and_read_again = self.read_dta(path)
Expand Down Expand Up @@ -1022,7 +1023,7 @@ def test_categorical_warnings_and_errors(self):
[original[col].astype("category") for col in original], axis=1
)

with tm.assert_produces_warning(io.stata.ValueLabelTypeMismatch):
with tm.assert_produces_warning(ValueLabelTypeMismatch):
original.to_stata(path)
# should get a warning for mixed content

Expand Down Expand Up @@ -1652,7 +1653,7 @@ def test_convert_strl_name_swap(self):
)
original.index.name = "index"

with tm.assert_produces_warning(io.stata.InvalidColumnName):
with tm.assert_produces_warning(InvalidColumnName):
with tm.ensure_clean() as path:
original.to_stata(path, convert_strl=["long", 1], version=117)
reread = self.read_dta(path)
Expand Down