Пример #1
0
class TestAnnotator(unittest.TestCase):
    def setUp(self):
        self.annotator = Annotator(TestFiles.make_io_helper())

    def test_can_create(self):
        assert self.annotator

    def test_creates_prefixes_without_information(self):
        self.assertEqual(self.annotator.save_as_turtle(as_string=True), \
                         TestFiles.PREFIXES)

    def test_includes_added_organism_into_turtle(self):
        self.annotator.add_bug(*TestFiles.BOUNDING_BOX)
        self.assertEqual(self.annotator.save_as_turtle(as_string=True), \
                         TestFiles.make_rdf_file())
Пример #2
0
class TestAnnotator(unittest.TestCase):
    def setUp(self):
        self.annotator = Annotator(TestFiles.make_io_helper())


    def test_can_create(self):
        assert self.annotator


    def test_creates_prefixes_without_information(self):
        self.assertEqual(self.annotator.save_as_turtle(as_string=True), \
                         TestFiles.PREFIXES)


    def test_includes_added_organism_into_turtle(self):
        self.annotator.add_bug(*TestFiles.BOUNDING_BOX)
        self.assertEqual(self.annotator.save_as_turtle(as_string=True), \
                         TestFiles.make_rdf_file())