Beispiel #1
0
 def test_generate_buildfile(self):
     mydir = os.path.dirname(__file__)
     path = os.path.join(mydir, 'data')
     buildfilepath = os.path.join(path, 'build.yml')
     assert not os.path.exists(buildfilepath)
     build.generate_build_file(path)
     assert os.path.exists(buildfilepath)
     build.build_package('test_hdf5', 'generated', buildfilepath)
     os.remove(buildfilepath)
Beispiel #2
0
def test_build():
    """
    Test compilation
    """
    mydir = os.path.dirname(__file__)
    PATH = os.path.join(mydir, './build.yml')
    build.build_package(USER, PACKAGE, PATH)
    # TODO load DFs based on contents of .yml file at PATH
    # not hardcoded vals (this will require loading modules from variable
    # names, probably using __module__)
    from quilt.data.test_121.groot import csv, tsv, xls
    rows = len(csv.index)
    assert rows == len(tsv.index) and rows == len(xls.index), \
        'Expected dataframes to have same # rows'
    cols = len(csv.columns)
    print(csv.columns, xls.columns, tsv.columns)
    assert cols == len(tsv.columns) and cols == len(xls.columns), \
        'Expected dataframes to have same # columns'
Beispiel #3
0
 def test_build_arrow(self):
     """
     Test compilation
     """
     os.environ["QUILT_PACKAGE_FORMAT"] = PackageFormat.ARROW.value
     mydir = os.path.dirname(__file__)
     path = os.path.join(mydir, './build.yml')
     build.build_package('test_arrow', PACKAGE, path)
     # TODO load DFs based on contents of .yml file at path
     # not hardcoded vals (this will require loading modules from variable
     # names, probably using __module__)
     from quilt.data.test_arrow.groot import dataframes, README
     csv = dataframes.csv
     tsv = dataframes.csv
     xls = dataframes.xls
     rows = len(csv.index)
     assert rows == len(tsv.index) and rows == len(xls.index), \
         'Expected dataframes to have same # rows'
     cols = len(csv.columns)
     print(csv.columns, xls.columns, tsv.columns)
     assert cols == len(tsv.columns) and cols == len(xls.columns), \
         'Expected dataframes to have same # columns'
     del os.environ["QUILT_PACKAGE_FORMAT"]
Beispiel #4
0
 def test_failover(self):
     mydir = os.path.dirname(__file__)
     path = os.path.join(mydir, './build_failover.yml')
     build.build_package('test_failover', PACKAGE, path)
     from quilt.data.test_failover import bad