Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
soapy1 committed Nov 22, 2024
1 parent 237d7e3 commit 500b497
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 27 deletions.
9 changes: 4 additions & 5 deletions conda-store-server/tests/_internal/action/test_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,10 @@ def test_solve_lockfile_multiple_platforms(conda_store, specification, request):


def test_save_lockfile(simple_lockfile_specification):
"""Ensure lockfile is saved in conda-lock `output` format"""
context = action.action_save_lockfile(
specification=simple_lockfile_specification
)
assert context.result == simple_lockfile_specification.lockfile.dict_for_output()
"""Ensure lockfile is saved in conda-lock `output` format"""
context = action.action_save_lockfile(specification=simple_lockfile_specification)
assert context.result == simple_lockfile_specification.lockfile.dict_for_output()


@pytest.mark.parametrize(
"specification_name",
Expand Down
32 changes: 10 additions & 22 deletions conda-store-server/tests/_internal/test_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,9 @@ def test_lockfile():
"content_hash": {
"linux-64": "5514f6769db31a2037c24116f89239737c66d009b2d0c71e2872339c3cf1a8f6"
},
"channels": [
{
"url": "conda-forge",
"used_env_vars": []
}
],
"platforms": [
"linux-64"
],
"sources": [
"environment.yaml"
]
"channels": [{"url": "conda-forge", "used_env_vars": []}],
"platforms": ["linux-64"],
"sources": ["environment.yaml"],
},
"package": [
{
Expand All @@ -38,29 +29,26 @@ def test_lockfile():
"url": "https://conda.anaconda.org/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2",
"hash": {
"md5": "d7c89558ba9fa0495403155b64376d81",
"sha256": "fe51de6107f9edc7aa4f786a70f4a883943bc9d39b3bb7307c04c41410990726"
"sha256": "fe51de6107f9edc7aa4f786a70f4a883943bc9d39b3bb7307c04c41410990726",
},
"category": "main",
"optional": False
"optional": False,
},
{
"name": "_openmp_mutex",
"version": "4.5",
"manager": "conda",
"platform": "linux-64",
"dependencies": {
"_libgcc_mutex": "0.1",
"libgomp": ">=7.5.0"
},
"dependencies": {"_libgcc_mutex": "0.1", "libgomp": ">=7.5.0"},
"url": "https://conda.anaconda.org/conda-forge/linux-64/_openmp_mutex-4.5-2_gnu.tar.bz2",
"hash": {
"md5": "73aaf86a425cc6e73fcf236a5a46396d",
"sha256": "fbe2c5e56a653bebb982eda4876a9178aedfc2b545f25d0ce9c4c0b508253d22"
"sha256": "fbe2c5e56a653bebb982eda4876a9178aedfc2b545f25d0ce9c4c0b508253d22",
},
"category": "main",
"optional": False
"optional": False,
},
]
],
}


Expand All @@ -70,7 +58,7 @@ def test_parse_lockfile_obj(test_lockfile):
"description": "test",
# use a copy of the lockfile so it's not mutated and we can compare
# against the original dict
"lockfile": test_lockfile.copy()
"lockfile": test_lockfile.copy(),
}
specification = schema.LockfileSpecification.parse_obj(lockfile_spec)
assert specification.dict()["lockfile"] == test_lockfile

0 comments on commit 500b497

Please sign in to comment.