def check(filename): spec = _load_environment_yml(filename) assert spec is not None (desynced, name) = _find_out_of_sync_importable_spec([spec], os.path.dirname(filename)) assert desynced is None assert name is None
def check(filename): spec = _load_environment_yml(filename) assert spec is not None changed = EnvSpec( name=spec.name, conda_packages=spec.conda_packages[1:], pip_packages=spec.pip_packages, channels=spec.channels) (desynced, name) = _find_out_of_sync_importable_spec([changed], os.path.dirname(filename)) assert desynced is not None assert desynced.logical_hash == spec.logical_hash assert name == os.path.basename(filename)
def test_find_out_of_sync_does_not_exist(): (spec, name) = _find_out_of_sync_importable_spec([], "nopenopenope") assert spec is None assert name is None