Beispiel #1
0
 def test_oneline(self):
     self.assertEqual(
         repr(exfor_field.X4ReferenceField(self.short_example.split('\n'))),
         self.short_example)
     self.assertEqual(
         str(exfor_field.X4ReferenceField(self.short_example.split('\n'))),
         'Nuclear Instrum.and Methods in Physics Res. 217, 397 (1983)')
Beispiel #2
0
 def test_multiline(self):
     self.assertEqual(
         repr(exfor_field.X4ReferenceField(self.long_example.split('\n'))),
         self.long_example)
     self.assertEqual(
         str(exfor_field.X4ReferenceField(self.long_example.split('\n'))),
         'Annals of Nuclear Energy 11, 623 (1984); Progress report: ANL-NDM-85  (1984)'
     )
Beispiel #3
0
 def test_tautology_string(self):
     self.assertEqual(
         repr(
             exfor_field.X4ReferenceField(
                 self.tautology_string.split('\n'))), self.tautology_string)
     self.assertEqual(
         str(exfor_field.X4ReferenceField(
             self.tautology_string.split('\n'))),
         'Report other than progress report: CEA-N-1459  (1971); Report other than progress report: EANDC(E)-142L  (1971); Report other than progress report: INDC(FR)-4L  (1971); Private communication: Tellier  (1971)'
     )
Beispiel #4
0
 def test_kitchen_sink(self):
     self.assertEqual(
         repr(
             exfor_field.X4ReferenceField(
                 self.kitchen_sink_tautology_example.split('\n'))),
         self.kitchen_sink_tautology_example)
     self.assertEqual(
         str(
             exfor_field.X4ReferenceField(
                 self.kitchen_sink_tautology_example.split('\n'))),
         'J.Nucl.Science and Technol.Tokyo,Supplement 2, (1), 204 (2002); J.Nucl.Science and Technol.Tokyo,Supplement 1, 683 (2000); Nucl. Instrum. Methods in Physics Res., Sect.A 446, (3), 536 (2000); Report containing conference proc.: JAERI-C-2000-005 243 (1999); Report containing conference proc.: INDC(JPN)-185/U 243 (1999); Report containing conference proc.: JAERI-C-99-002 153 (1998); Report containing conference proc.: INDC(JPN)-182/U 153 (1998)'
     )
Beispiel #5
0
 def test_bathroom_sink(self):
     self.assertEqual(
         repr(
             exfor_field.X4ReferenceField(
                 self.bathroom_sink_tautology_example.split('\n'))),
         self.bathroom_sink_tautology_example)
     self.assertEqual(
         str(
             exfor_field.X4ReferenceField(
                 self.bathroom_sink_tautology_example.split('\n'))),
         'Progress report: NEANDC(E)-232 (3), 5 (1982); Progress report: NEANDC(E)-222 (3), 3 (1981); Report other than progress report: ANL-83-4  (1983); Report other than progress report: NEANDC(US)-214  (1983); Progress report: NEANDC(E)-212 (3), 10 (1980)'
     )
Beispiel #6
0
 def test_tricky_tautology_example(self):
     self.assertEqual(
         repr(
             exfor_field.X4ReferenceField(
                 self.tricky_tautology_example.split('\n'))),
         self.tricky_tautology_example)
     self.assertEqual(
         str(
             exfor_field.X4ReferenceField(
                 self.tricky_tautology_example.split('\n'))),
         'Report other than progress report: YK-5(49) 17 (1982); Vop. At.Nauki i Tekhn.,Ser.Yadernye Konstanty 1982, (5), 17 (1982)'
     )
Beispiel #7
0
 def test_ya_tautology_example(self):
     self.assertEqual(
         repr(
             exfor_field.X4ReferenceField(
                 self.ya_tautology_example.split('\n'))),
         self.ya_tautology_example)
     self.assertEqual(
         str(
             exfor_field.X4ReferenceField(
                 self.ya_tautology_example.split('\n'))),
         'J. of Nuclear Science and Technology, Tokyo 31, 1239 (1994); Report containing conference proc.: JAERI-M-94-019 171 (1993); Report containing conference proc.: INDC(JPN)-169/L 171 (1993)'
     )
Beispiel #8
0
 def test_another_tautology(self):
     self.assertEqual(
         repr(
             exfor_field.X4ReferenceField(
                 self.another_tautology_example.split('\n'))),
         self.another_tautology_example)
     self.assertEqual(
         str(
             exfor_field.X4ReferenceField(
                 self.another_tautology_example.split('\n'))),
         'Nuclear Physics 70, 421 (1965); Report other than progress report: JAERI-1078  (1965); Report other than progress report: EANDC(J)-5S  (1965); Private communication: Nishimura  (1971)'
     )
Beispiel #9
0
 def test_tautology(self):
     self.assertEqual(
         repr(
             exfor_field.X4ReferenceField(
                 self.tautology_example.split('\n'))),
         self.tautology_example)
     self.assertEqual(
         str(
             exfor_field.X4ReferenceField(
                 self.tautology_example.split('\n'))),
         'Private communication: Kobayashi  (1973); Report other than progress report: KURRI-TR-6 1 (1973); Progress report: EANDC(J)-26 39 (1972)'
     )
Beispiel #10
0
 def test_reallylong(self):
     self.assertEqual(
         repr(
             exfor_field.X4ReferenceField(
                 self.really_long_example.split('\n'))),
         self.really_long_example)
     self.assertEqual(
         str(
             exfor_field.X4ReferenceField(
                 self.really_long_example.split('\n'))),
         'Acta Physica Polonica, Part B 2, 489 (1971); Progress report: INR-1318 29 (1971); Progress report: INDC(SEC)-18 120 (1971); Report other than progress report: INR-1224  (1970); Progress report: INR-1197 26 (1970); Canadian Journal of Physics 47, 2849 (1969)'
     )
Beispiel #11
0
 def test_doi(self):
     self.assertEqual(
         repr(exfor_field.X4ReferenceField(self.doi.split('\n'))), self.doi)
     self.assertEqual(
         str(exfor_field.X4ReferenceField(self.doi.split('\n'))),
         'Physical Review, Part C, Nuclear Physics 72, 034302 (2005)')