Exemplo n.º 1
0
    def test_new_projects(self):
        from hyo.soundspeed.soundspeed import SoundSpeedLibrary

        lib = SoundSpeedLibrary()
        ssp_list = lib.db_list_profiles()
        self.assertGreaterEqual(len(ssp_list), 0)

        lib.current_project = "zzz"
        ssp_list = lib.db_list_profiles()
        self.assertGreaterEqual(len(ssp_list), 0)

        prj_list = lib.list_projects()
        self.assertGreaterEqual(len(prj_list), 2)

        lib.current_project = "aaa"
        lib.remove_project("zzz")
        prj_list = lib.list_projects()
        self.assertGreaterEqual(len(prj_list), 1)

        lib.close()
Exemplo n.º 2
0
    def test_available_projects(self):
        from hyo.soundspeed.soundspeed import SoundSpeedLibrary

        lib = SoundSpeedLibrary()
        ssp_list = lib.db_list_profiles()
        self.assertGreaterEqual(len(ssp_list), 0)

        prj_list = lib.list_projects()
        self.assertGreaterEqual(len(prj_list), 1)

        lib.close()
Exemplo n.º 3
0
def main():
    # initialize the library
    lib = SoundSpeedLibrary()

    prj_list = lib.list_projects()
    print("projects: %s" % len(prj_list))
    for prj in prj_list:
        print('- %s' % prj)

    lib.current_project = "test2"

    ssp_list = lib.db_list_profiles()
    print('profiles in db: %d' % len(ssp_list))

    lib.close()