Beispiel #1
0
def test_pp_netcdf(revision, tmpdir):
    ifile = _gentestfile(IFILE1.format(revision), tmpdir)
    ofile = os.path.join(tmpdir, "test_v{0}_t.nc".format(revision))
    p = Popen([
        "python",
        "-m",
        "sciapy.level2.post_process",
        "-A",
        "The Dude",
        "-M",
        "2010-02",
        "-R",
        revision,
        "-p",
        os.path.join(DATADIR, "l2"),
        "-s",
        os.path.join(DATADIR, "l1c"),
        "--mlt",
        ofile,
    ])
    p.communicate()
    p.wait()
    assert p.returncode == 0
    ncallclose(ifile, ofile)
    nccmpattrs(ifile, ofile, ignore=["creation_time", "software"])
Beispiel #2
0
def test_pp_module(binary, revision, tmpdir):
    ifile = _gentestfile(IFILE2.format(revision), tmpdir)
    ofile = os.path.join(tmpdir, "test_v{0}x_t.nc".format(revision))
    p = Popen(
        binary.split(" ") + [
            "-A",
            "The Dude",
            "-M",
            "2010-02",
            "-R",
            revision,
            "-p",
            os.path.join(DATADIR, "l2"),
            "-s",
            os.path.join(DATADIR, "l1c"),
            "--mlt",
            "-X",
            ofile,
        ])
    p.communicate()
    p.wait()
    assert p.returncode == 0
    ncallclose(ifile, ofile)
    nccmpattrs(ifile, ofile, ignore=["creation_time", "software"])