def test_substratesample_eq(sample): assert sample == SubstrateSample(COPPER) assert sample != SubstrateSample(ZINC) assert sample != SubstrateSample(COPPER, 1.1)
def testconvert(self): handler = SubstrateSampleSeriesHandler() sample = SubstrateSample(Material.pure(29), 0.1, 0.2) s = handler.convert(sample) self.assertEqual(4, len(s))
def sample(): return SubstrateSample(COPPER)
def testconvert(self): handler = SubstrateSampleHtmlHandler() sample = SubstrateSample(Material.pure(29), 0.1, 0.2) root = handler.convert(sample) self.assertEqual(4, len(root.children))
def testconvert_parse(self): handler = SubstrateSampleHDF5Handler() sample = SubstrateSample(Material.pure(29), 0.1, 0.2) sample2 = self.convert_parse_hdf5handler(handler, sample) self.assertEqual(sample2, sample)
def test__ne__(self): s = SubstrateSample(ZINC) self.assertNotEqual(s, self.s) s = SubstrateSample(COPPER, 1.1) self.assertNotEqual(s, self.s)
def test__eq__(self): s = SubstrateSample(COPPER) self.assertEqual(s, self.s)
def setUp(self): super().setUp() self.s = SubstrateSample(COPPER)