Skip to content
Snippets Groups Projects
Commit 739385ce authored by Colm Talbot's avatar Colm Talbot
Browse files

fix repr tests

parent d373638c
No related branches found
No related tags found
No related merge requests found
......@@ -51,16 +51,14 @@ class TestWaveformGeneratorInstantiationWithoutOptionalParameters(unittest.TestC
tupak.gw.waveform_generator.WaveformGenerator(1, 4096,
time_domain_source_model=dummy_func_dict_return_value)
expected = 'WaveformGenerator(duration={}, sampling_frequency={}, start_time={}, ' \
'frequency_domain_source_model={}, time_domain_source_model={}, parameters={}, ' \
'parameter_conversion={}, non_standard_sampling_parameter_keys={}, waveform_arguments={})'\
'frequency_domain_source_model={}, time_domain_source_model={}, ' \
'parameter_conversion={}, waveform_arguments={})'\
.format(self.waveform_generator.duration,
self.waveform_generator.sampling_frequency,
self.waveform_generator.start_time,
self.waveform_generator.frequency_domain_source_model,
self.waveform_generator.time_domain_source_model.__name__,
self.waveform_generator.parameters,
None,
self.waveform_generator.non_standard_sampling_parameter_keys,
self.waveform_generator.waveform_arguments)
self.assertEqual(expected, repr(self.waveform_generator))
......@@ -70,16 +68,14 @@ class TestWaveformGeneratorInstantiationWithoutOptionalParameters(unittest.TestC
self.waveform_generator.parameter_conversion = conversion_func
expected = 'WaveformGenerator(duration={}, sampling_frequency={}, start_time={}, ' \
'frequency_domain_source_model={}, time_domain_source_model={}, parameters={}, ' \
'parameter_conversion={}, non_standard_sampling_parameter_keys={}, waveform_arguments={})'\
'frequency_domain_source_model={}, time_domain_source_model={}, ' \
'parameter_conversion={}, waveform_arguments={})'\
.format(self.waveform_generator.duration,
self.waveform_generator.sampling_frequency,
self.waveform_generator.start_time,
self.waveform_generator.frequency_domain_source_model.__name__,
self.waveform_generator.time_domain_source_model,
self.waveform_generator.parameters,
conversion_func.__name__,
self.waveform_generator.non_standard_sampling_parameter_keys,
self.waveform_generator.waveform_arguments)
self.assertEqual(expected, repr(self.waveform_generator))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment