Exemple #1
0
 def test_cli_wcxf2dsixtools(self):
     smeftio = dsixtools.SMEFTio()
     smeftio.load_initial((wcin_lha, options, smin))
     d1 = dsixtools.load(smeftio.dump(smeftio.C_in))
     res = subprocess.run(['wcxf2dsixtools', '-'],
                          input=wcin_json.encode(),
                          stdout=subprocess.PIPE)
     s = res.stdout.decode('utf-8')
     d2 = dsixtools.load(s)
     self.assertDictEqual(d1, d2)
Exemple #2
0
 def test_wcxf2dsixtools(self):
     wc = wcxf.WC.load(wcin_json)
     d1 = dsixtools.load(dsixtools.wcxf2dsixtools(wc))
     smeftio = dsixtools.SMEFTio()
     smeftio.load_initial((wcin_lha, options, smin))
     d2 = dsixtools.load(smeftio.dump(smeftio.C_in))
     for key in ['SCALES', 'OPTIONS']:
         d1['BLOCK'].pop(key, None)
         d2['BLOCK'].pop(key, None)
     self.assertDictEqual(d1, d2)
Exemple #3
0
 def test_dsixtools2wcxf(self):
     smeftio = dsixtools.SMEFTio()
     smeftio.load_initial((wcin_lha, options, smin))
     d1 = wcxf.WC.load(dsixtools.dsixtools2wcxf(
         (wcin_lha, options, smin))).dict
     d2 = wcxf.WC.load(wcin_yaml).dict
     self.assertTrue(d1)
     self.assertTrue(d2)
     self.assertEqual(set(d1.keys()), set(d2.keys()))
     for k in d1:
         self.assertEqual(d1[k], d2[k], msg="Failed for {}".format(k))
Exemple #4
0
 def test_smeftio(self):
     smeftio = dsixtools.SMEFTio()
     smeftio.load_wcxf(wcin_json)
     smeftio.load_wcxf(wcin_yaml)
     smeftio.load_initial((wcin_lha, options, smin))