Exemple #1
0
    def test_read_write_arcs_pickle(self):
        # Test the old pickle format.
        covdata1 = CoverageData()
        covdata1.add_arcs(ARCS_3)
        self.write_pickled_file(covdata1, "arcs.pkl")

        pickle2json("arcs.pkl", "arcs.json")

        covdata2 = CoverageData()
        covdata2.read_file("arcs.json")
        self.assert_arcs3_data(covdata2)
    def test_read_write_arcs_pickle(self):
        # Test the old pickle format.
        covdata1 = CoverageData()
        covdata1.set_arcs(ARCS_3)
        self.write_pickled_file(covdata1, "arcs.pkl")

        pickle2json("arcs.pkl", "arcs.json")

        covdata2 = CoverageData()
        covdata2.read_file("arcs.json")
        self.assert_arcs3_data(covdata2)
Exemple #3
0
    def test_read_write_lines_pickle(self):
        # Test the old pickle format.
        covdata1 = CoverageData()
        covdata1.add_lines(LINES_1)
        self.write_pickled_file(covdata1, "lines.pkl")

        pickle2json("lines.pkl", "lines.json")

        covdata2 = CoverageData()
        covdata2.read_file("lines.json")
        self.assert_lines1_data(covdata2)
    def test_read_write_lines_pickle(self):
        # Test the old pickle format.
        covdata1 = CoverageData()
        covdata1.set_lines(LINES_1)
        self.write_pickled_file(covdata1, "lines.pkl")

        pickle2json("lines.pkl", "lines.json")

        covdata2 = CoverageData()
        covdata2.read_file("lines.json")
        self.assert_lines1_data(covdata2)