def test_table_metadata(self): ids, cols = psda.get_table_dataids_and_column_names( 'shared', 'validated_01_2014') self.assertIn(744, ids, 'shared table 01 2014 has dataid 744') self.assertIn('use', cols, 'shared table 01 2014 has column "use"') self.assertIn('air1', cols, 'shared table 01 2014 has column "air1"') pass
##this is wrong it depends which version is running schema = dataset #schema_e = schema[1:-1] tables = pecan.get_table_names(schema) print 'You can now view data for any of these months\n' for i in tables: print i + '\n' print '''Which month would you like to view data for? Please enter one of the table names exactly as it is printed and as a string: ''' month = raw_input() print month print "This next step takes about a minute..." i,a = pecan.get_table_dataids_and_column_names(schema,str(month)) print '''You can now load data for a single home. Here are the homes you can choose from:\n''' for home in i: print home print '''Each home has the same kind of appliances. Here is a list of those appliances:''' print a print '''You can now get trace information per house. You can also see the trace of a particular appliance. However this is the point where you are informed that "seeing" is actually a step that comes after pickling. Do you want to pickle a house? If not you will be asked shortly to pickle a type? Enter yes or no''' boo = raw_input()
##this is wrong it depends which version is running schema = dataset #schema_e = schema[1:-1] tables = pecan.get_table_names(schema) print 'You can now view data for any of these months\n' for i in tables: print i + '\n' print '''Which month would you like to view data for? Please enter one of the table names exactly as it is printed and as a string: ''' month = raw_input() print month print "This next step takes about a minute..." i, a = pecan.get_table_dataids_and_column_names(schema, str(month)) print '''You can now load data for a single home. Here are the homes you can choose from:\n''' for home in i: print home print '''Each home has the same kind of appliances. Here is a list of those appliances:''' print a print '''You can now get trace information per house. You can also see the trace of a particular appliance. However this is the point where you are informed that "seeing" is actually a step that comes after pickling. Do you want to pickle a house? If not you will be asked shortly to pickle a type? Enter yes or no''' boo = raw_input()
def test_table_metadata(self): ids,cols = psda.get_table_dataids_and_column_names('shared','validated_01_2014') self.assertIn(744,ids,'shared table 01 2014 has dataid 744') self.assertIn('use',cols,'shared table 01 2014 has column "use"') self.assertIn('air1',cols,'shared table 01 2014 has column "air1"') pass