File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- from pulp_gem .specs import ruby_ver_cmp , ruby_ver_includes
1+ import asyncio
2+
3+ from pulp_gem .specs import read_info , ruby_ver_cmp , ruby_ver_includes
24
35
46def test_version_cmp ():
@@ -20,3 +22,22 @@ def test_version_includes():
2022 assert ruby_ver_includes (">= 1&< 3" , "1.5.a0" )
2123 assert ruby_ver_includes (">= 1&< 3" , "3.0.0a5" )
2224 assert not ruby_ver_includes (">= 1&< 3" , "3.0.1a5" )
25+
26+
27+ def test_read_info_colon_in_value (tmp_path ):
28+ info_file = tmp_path / "info"
29+ info_file .write_text (
30+ "---\n "
31+ "7.0.1 activesupport:= 7.0.1|checksum:abc123,ruby:>= 2.7.0,rubygems:>= 1.8.11\n "
32+ )
33+ versions_info = {"7.0.1" : {"version" : "7.0.1" , "platform" : "ruby" , "prerelease" : False }}
34+
35+ async def _collect ():
36+ return [info async for info in read_info (str (info_file ), versions_info )]
37+
38+ results = asyncio .run (_collect ())
39+ assert len (results ) == 1
40+ assert results [0 ]["checksum" ] == "abc123"
41+ assert results [0 ]["required_ruby_version" ] == ">= 2.7.0"
42+ assert results [0 ]["required_rubygems_version" ] == ">= 1.8.11"
43+ assert results [0 ]["dependencies" ] == {"activesupport" : "= 7.0.1" }
You can’t perform that action at this time.
0 commit comments