nilmtk.tests package

Submodules

nilmtk.tests.generate_data module

nilmtk.tests.generate_data.add_building_metadata(store, elec_meters, key='building1', appliances=[])[source]
nilmtk.tests.generate_data.create_all()[source]
nilmtk.tests.generate_data.create_co_test_hdf5()[source]
nilmtk.tests.generate_data.create_energy_hdf5(simple=True)[source]
nilmtk.tests.generate_data.create_random_df()[source]
nilmtk.tests.generate_data.create_random_df_hierarchical_column_index()[source]
nilmtk.tests.generate_data.create_random_hdf5()[source]
nilmtk.tests.generate_data.power_data(simple=True)[source]
Returns:DataFrame

nilmtk.tests.test_combinatorial_optimisation module

class nilmtk.tests.test_combinatorial_optimisation.TestCO(methodName='runTest')[source]

Bases: unittest.case.TestCase

classmethod setUpClass()[source]
classmethod tearDownClass()[source]
test_co_correctness()[source]

nilmtk.tests.test_datastore module

class nilmtk.tests.test_datastore.SuperTestDataStore[source]

Bases: object

END_DATE = Timestamp('2012-01-01 02:46:39')
NROWS = 10000.0
START_DATE = Timestamp('2012-01-01 00:00:00')
TIMEFRAME = TimeFrame(start='2012-01-01 00:00:00', end='2012-01-01 02:46:39', empty=False)
test_load()[source]
test_load_chunks()[source]
test_load_chunks_small_chunksize()[source]
test_timeframe()[source]
class nilmtk.tests.test_datastore.TestCSVDataStore(methodName='runTest')[source]

Bases: unittest.case.TestCase, nilmtk.tests.test_datastore.SuperTestDataStore

classmethod setUpClass()[source]
classmethod tearDownClass()[source]
class nilmtk.tests.test_datastore.TestHDFDataStore(methodName='runTest')[source]

Bases: unittest.case.TestCase, nilmtk.tests.test_datastore.SuperTestDataStore

classmethod setUpClass()[source]
classmethod tearDownClass()[source]
test_column_names()[source]
test_estimate_memory_requirement()[source]
test_n_rows()[source]

nilmtk.tests.test_datastore_converter module

nilmtk.tests.test_elecmeter module

class nilmtk.tests.test_elecmeter.TestElecMeter(methodName='runTest')[source]

Bases: nilmtk.tests.testingtools.WarningTestMixin, unittest.case.TestCase

correlation()[source]
classmethod setUpClass()[source]
classmethod tearDownClass()[source]
test_load()[source]
test_proportion_of_energy()[source]
test_total_energy()[source]
test_upstream_meter()[source]

nilmtk.tests.test_measurement module

class nilmtk.tests.test_measurement.TestMeasurement(methodName='runTest')[source]

Bases: unittest.case.TestCase

test_as_dataframe_columns()[source]
test_check_ac_type()[source]
test_select_best_ac_type()[source]

nilmtk.tests.test_metergroup module

class nilmtk.tests.test_metergroup.TestMeterGroup(methodName='runTest')[source]

Bases: unittest.case.TestCase

classmethod setUpClass()[source]
classmethod tearDownClass()[source]
test_dual_supply()[source]
test_from_list()[source]
test_full_results_with_no_sections_raises_runtime_error()[source]
test_getitem()[source]
test_load()[source]
test_proportion_of_energy_submetered()[source]
test_select()[source]
test_total_energy()[source]
test_wiring_graph()[source]

nilmtk.tests.test_metrics module

class nilmtk.tests.test_metrics.TestMetrics(methodName='runTest')[source]

Bases: unittest.case.TestCase

classmethod setUpClass()[source]
classmethod tearDownClass()[source]
test_f1()[source]

nilmtk.tests.test_node module

class nilmtk.tests.test_node.TestNode(methodName='runTest')[source]

Bases: unittest.case.TestCase

test_unsatisfied_requirements()[source]

nilmtk.tests.test_timeframe module

class nilmtk.tests.test_timeframe.TestTimeFrame(methodName='runTest')[source]

Bases: unittest.case.TestCase

test_adjacent()[source]
test_date_setting()[source]
test_intersection()[source]
test_merge_timeframes()[source]
test_time_delta()[source]
test_union()[source]

nilmtk.tests.testingtools module

Tools to help with testing.

class nilmtk.tests.testingtools.WarningTestMixin[source]

Bases: object

A test which checks if the specified warning was raised.

Taken from http://stackoverflow.com/a/12935176/732596

assertWarns(warning, callable, *args, **kwds)[source]
nilmtk.tests.testingtools.data_dir()[source]

Module contents