Skip to content

Commit f72554e

Browse files
committed
Ensure opam tests are running
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
1 parent 6a9db8f commit f72554e

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

src/packagedcode/opam.py

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -147,20 +147,22 @@ def get_api_data_url(name, version):
147147
r'(?P<version>(.*))'
148148
).match
149149

150-
"""
151-
Example:
152-
>>> p = parse_file_line('authors: "BAP Team"')
153-
>>> assert p.group('key') == ('authors')
154-
>>> assert p.group('value') == ('"BAP Team"')
155-
156-
>>> p = parse_file_line('md5=b7a7b7cce64eabf224d05ed9f2b9d471')
157-
>>> assert p.group('key') == ('md5')
158-
>>> assert p.group('value') == ('b7a7b7cce64eabf224d05ed9f2b9d471')
159-
160-
>>> p = parse_dep('"bap-std" {= "1.0.0"}')
161-
>>> assert p.group('name') == ('bap-std')
162-
>>> assert p.group('version') == ('{= "1.0.0"}')
163-
"""
150+
def _test_parse():
151+
"""
152+
Example::
153+
154+
>>> p = parse_file_line('authors: "BAP Team"')
155+
>>> assert p.group('key') == ('authors')
156+
>>> assert p.group('value') == ('"BAP Team"')
157+
158+
>>> p = parse_checksum('md5=b7a7b7cce64eabf224d05ed9f2b9d471')
159+
>>> assert p.group('key') == ('md5')
160+
>>> assert p.group('value') == ('b7a7b7cce64eabf224d05ed9f2b9d471')
161+
162+
>>> p = parse_dep('"bap-std" {= "1.0.0"}')
163+
>>> assert p.group('name') == ('bap-std')
164+
>>> assert p.group('version') == ('{= "1.0.0"}')
165+
"""
164166

165167

166168
def parse_opam(location):

0 commit comments

Comments
 (0)