Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_xport_usecols(self):
# Currently readstat does not support skipping cols for XPT files,
usecols = [x.upper() for x in self.usecols]
df, meta = pyreadstat.pyreadstat.read_xport(os.path.join(self.basic_data_folder, "sample.xpt"), usecols=usecols)
df.columns = [x.lower() for x in df.columns]
self.assertTrue(df.equals(self.df_usecols))
self.assertTrue(meta.number_columns == len(self.usecols))