Ejemplo n.º 1
0
class BulkAstromWriterTest(GeneralAstromWriterTest):
    def setUp(self):
        super(BulkAstromWriterTest, self).setUp()
        self.writer = BulkAstromWriter(self.outputfile)

    def test_parse_then_rewrite(self):
        """
        Sanity check that we can parse data, then write that data back out
        identically.
        """
        astrom_data = self.parse(TEST_FILE_1)
        self.writer.write_astrom_data(astrom_data)

        actual = self.read_output()

        with open(self.get_abs_path(TEST_FILE_1), "rb") as fh:
            expected = fh.read()

        assert_that(actual, equal_to(expected))
Ejemplo n.º 2
0
class BulkAstromWriterTest(GeneralAstromWriterTest):
    def setUp(self):
        super(BulkAstromWriterTest, self).setUp()
        self.writer = BulkAstromWriter(self.outputfile)

    def test_parse_then_rewrite(self):
        """
        Sanity check that we can parse data, then write that data back out
        identically.
        """
        astrom_data = self.parse(TEST_FILE_1)
        self.writer.write_astrom_data(astrom_data)

        actual = self.read_output()

        with open(self.get_abs_path(TEST_FILE_1), "rb") as fh:
            expected = fh.read()

        assert_that(actual, equal_to(expected))
Ejemplo n.º 3
0
 def setUp(self):
     super(BulkAstromWriterTest, self).setUp()
     self.writer = BulkAstromWriter(self.outputfile)
Ejemplo n.º 4
0
 def setUp(self):
     super(BulkAstromWriterTest, self).setUp()
     self.writer = BulkAstromWriter(self.outputfile)