Skip to content

Commit c2e35bb

Browse files
committed
Update expected test results #821
Signed-off-by: Jono Yang <jyang@nexb.com>
1 parent e372e3c commit c2e35bb

2 files changed

Lines changed: 67 additions & 53 deletions

File tree

minecode/tests/collectors/test_pypi.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
import packagedb
1818
from minecode.collectors import pypi
19+
from minecode.tests import FIXTURES_REGEN
1920
from minecode.utils_test import JsonBasedTesting
2021

2122

@@ -28,11 +29,15 @@ def setUp(self):
2829
with open(self.expected_json_loc) as f:
2930
self.expected_json_contents = json.load(f)
3031

31-
def test_get_package_json(self):
32+
def test_get_package_json(self, regen=FIXTURES_REGEN):
3233
json_contents = pypi.get_package_json(
3334
name="cage",
3435
version="1.1.4",
3536
)
37+
if regen:
38+
self.expected_json_contents = json_contents
39+
with open(self.expected_json_loc, "w") as f:
40+
json.dump(json_contents, f)
3641
self.assertEqual(self.expected_json_contents, json_contents)
3742

3843
def test_get_all_package_version(self):
Lines changed: 61 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,64 @@
11
{
2-
"info": {
3-
"author": "Erik Max Francis",
4-
"author_email": "software@alcyone.com",
5-
"bugtrack_url": null,
6-
"classifiers": [
7-
"Development Status :: 6 - Mature",
8-
"Intended Audience :: Developers",
9-
"Intended Audience :: End Users/Desktop",
10-
"Intended Audience :: Science/Research",
11-
"License :: OSI Approved :: GNU General Public License (GPL)",
12-
"Operating System :: OS Independent",
13-
"Programming Language :: Python",
14-
"Topic :: Games/Entertainment",
15-
"Topic :: Scientific/Engineering :: Artificial Intelligence",
16-
"Topic :: Scientific/Engineering :: Mathematics"
17-
],
18-
"description": "CAGE is a fairy generic and complete cellular automaton simulation\r\n engine in Python. It supports both 1D and 2D automata, a variety\r\n of prepackaged rules, and the concept of \"agents\" which can move\r\n about independently on the map for implementing agent behavior.\r\n\r\n CAGE comes with numerous examples of fully-functional CA systems,\r\n including Conway's Game of Life, Langton's self-reproducing\r\n automaton, Langton's \"vants,\" and 1D automata rule explorers. It\r\n also comes with simple displayers (including a curses interface\r\n for 2D automata). Also included is a unique implementation of a\r\n finite state machine (ant.py).",
19-
"description_content_type": null,
20-
"docs_url": null,
21-
"download_url": "http://www.alcyone.com/software/cage/cage-latest.tar.gz",
22-
"downloads": {
23-
"last_day": -1,
24-
"last_month": -1,
25-
"last_week": -1
2+
"info": {
3+
"author": "Erik Max Francis",
4+
"author_email": "software@alcyone.com",
5+
"bugtrack_url": null,
6+
"classifiers": [
7+
"Development Status :: 6 - Mature",
8+
"Intended Audience :: Developers",
9+
"Intended Audience :: End Users/Desktop",
10+
"Intended Audience :: Science/Research",
11+
"License :: OSI Approved :: GNU General Public License (GPL)",
12+
"Operating System :: OS Independent",
13+
"Programming Language :: Python",
14+
"Topic :: Games/Entertainment",
15+
"Topic :: Scientific/Engineering :: Artificial Intelligence",
16+
"Topic :: Scientific/Engineering :: Mathematics"
17+
],
18+
"description": "CAGE is a fairy generic and complete cellular automaton simulation\r\n engine in Python. It supports both 1D and 2D automata, a variety\r\n of prepackaged rules, and the concept of \"agents\" which can move\r\n about independently on the map for implementing agent behavior.\r\n\r\n CAGE comes with numerous examples of fully-functional CA systems,\r\n including Conway's Game of Life, Langton's self-reproducing\r\n automaton, Langton's \"vants,\" and 1D automata rule explorers. It\r\n also comes with simple displayers (including a curses interface\r\n for 2D automata). Also included is a unique implementation of a\r\n finite state machine (ant.py).",
19+
"description_content_type": null,
20+
"docs_url": null,
21+
"download_url": "http://www.alcyone.com/software/cage/cage-latest.tar.gz",
22+
"downloads": {
23+
"last_day": -1,
24+
"last_month": -1,
25+
"last_week": -1
26+
},
27+
"dynamic": null,
28+
"home_page": "http://www.alcyone.com/software/cage/",
29+
"keywords": "cellular automata, Turing machines, Langton vants, self-organizing systems, finite state machines, finite state automata",
30+
"license": "GPL",
31+
"license_expression": null,
32+
"license_files": null,
33+
"maintainer": "",
34+
"maintainer_email": "",
35+
"name": "CAGE",
36+
"package_url": "https://pypi.org/project/CAGE/",
37+
"platform": "any; Unix for curses frontend",
38+
"project_url": "https://pypi.org/project/CAGE/",
39+
"project_urls": {
40+
"Download": "http://www.alcyone.com/software/cage/cage-latest.tar.gz",
41+
"Homepage": "http://www.alcyone.com/software/cage/"
42+
},
43+
"provides_extra": null,
44+
"release_url": "https://pypi.org/project/CAGE/1.1.4/",
45+
"requires_dist": null,
46+
"requires_python": null,
47+
"summary": "A generic and fairly complete cellular automata simulation engine.",
48+
"version": "1.1.4",
49+
"yanked": false,
50+
"yanked_reason": null
2651
},
27-
"dynamic": null,
28-
"home_page": "http://www.alcyone.com/software/cage/",
29-
"keywords": "cellular automata, Turing machines, Langton vants, self-organizing systems, finite state machines, finite state automata",
30-
"license": "GPL",
31-
"license_expression": null,
32-
"license_files": null,
33-
"maintainer": "",
34-
"maintainer_email": "",
35-
"name": "CAGE",
36-
"package_url": "https://pypi.org/project/CAGE/",
37-
"platform": "any; Unix for curses frontend",
38-
"project_url": "https://pypi.org/project/CAGE/",
39-
"project_urls": {
40-
"Download": "http://www.alcyone.com/software/cage/cage-latest.tar.gz",
41-
"Homepage": "http://www.alcyone.com/software/cage/"
52+
"last_serial": 944145,
53+
"ownership": {
54+
"organization": null,
55+
"roles": [
56+
{
57+
"role": "Owner",
58+
"user": "xihr"
59+
}
60+
]
4261
},
43-
"provides_extra": null,
44-
"release_url": "https://pypi.org/project/CAGE/1.1.4/",
45-
"requires_dist": null,
46-
"requires_python": null,
47-
"summary": "A generic and fairly complete cellular automata simulation engine.",
48-
"version": "1.1.4",
49-
"yanked": false,
50-
"yanked_reason": null
51-
},
52-
"last_serial": 944145,
53-
"urls": [],
54-
"vulnerabilities": []
55-
}
62+
"urls": [],
63+
"vulnerabilities": []
64+
}

0 commit comments

Comments
 (0)