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_instantiation_smoketest(self):
sampler = ClipComposite(NullSampler())
dimod.testing.assert_sampler_api(sampler)
def test_instantiation(self):
sampler = dimod.ExactSolver()
dimod.testing.assert_sampler_api(sampler)
# this sampler has no properties and has no accepted parameters
self.assertEqual(sampler.properties, {})
self.assertEqual(sampler.parameters, {})
def test_instantiation(self):
sampler = Neal()
dimod.testing.assert_sampler_api(sampler)
def test_construction(self):
sampler = dimod.NullSampler()
dimod.testing.assert_sampler_api(sampler)
def test_10(self):
sampler = TruncateComposite(ExactSolver(), 10)
dtest.assert_sampler_api(sampler)
dtest.assert_composite_api(sampler)
self.assertEqual(sampler.parameters, {})
def test_api(self):
sampler = ScaleComposite(dimod.ExactSolver())
dimod.testing.assert_sampler_api(sampler)
def test_initialization(self):
sampler = dimod.RandomSampler()
dtest.assert_sampler_api(sampler)
self.assertEqual(sampler.properties, {})
self.assertEqual(sampler.parameters, {'num_reads': []})
def test_construction(self):
sampler = RoofDualityComposite(dimod.ExactSolver())
dtest.assert_sampler_api(sampler)