Skip to content

Commit

Permalink
Add test to cover parse_specs (#729)
Browse files Browse the repository at this point in the history
* Add test for parse_specs to attempt to reproduce

* chore: lint

* Rename file and add a comment

* Change username
  • Loading branch information
mattkram authored Oct 22, 2024
1 parent 6731e5a commit f747d36
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/utils/test_spec.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# pylint: disable=missing-module-docstring,missing-function-docstring
import binstar_client.utils.spec


def test_parse_specs():
# Reproducing for https://github.com/anaconda/anaconda-client/issues/642
spec = binstar_client.utils.spec.parse_specs("someuser/foo/1.2.3/blah-1.2.3.tar.bz2?x=1")
assert spec.user == "someuser"
assert spec.name == "foo"
assert spec.version == "1.2.3"
assert spec.basename == "blah-1.2.3.tar.bz2"
assert spec.attrs == {"x": "1"}

0 comments on commit f747d36

Please sign in to comment.