Esempio n. 1
0
 def test_get_random_sources(self):
     # we can get a dict of random sources registered as entry_points.
     sources_dict = get_random_sources()
     assert isinstance(sources_dict, dict)
     assert len(sources_dict) > 0
     assert 'system' in sources_dict
     assert isinstance(sources_dict['system'], type)
Esempio n. 2
0
 def test_get_random_sources(self):
     # we can get a dict of random sources registered as entry_points.
     sources_dict = get_random_sources()
     assert isinstance(sources_dict, dict)
     assert len(sources_dict) > 0
     assert 'system' in sources_dict
     assert isinstance(sources_dict['system'], type)
Esempio n. 3
0
 def test_handle_options_randomsource(self):
     # we can choose the source of randomness
     source_names = get_random_sources().keys()
     for name in source_names:
         options = handle_options(['-r', name])
         assert options.randomsource == name
         options = handle_options(['--randomsource', name])
         assert options.randomsource == name
Esempio n. 4
0
 def test_handle_options_randomsource(self):
     # we can choose the source of randomness
     source_names = get_random_sources().keys()
     for name in source_names:
         options = handle_options(['-r', name])
         assert options.randomsource == name
         options = handle_options(['--randomsource', name])
         assert options.randomsource == name