Skip to content

Commit 1922f84

Browse files
committed
Second pass at regenerating all code snippet log files with set seed
1 parent 8d18a46 commit 1922f84

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

lmfdb/tests/generate_snippet_tests.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ def _setup_test_dir(yaml_file_path=None):
6565
raise Exception("Please run in same directory as test.sh")
6666

6767
if yaml_file_path is None:
68-
code_paths = lmfdb_dir.rglob("code*.yaml")
68+
# Ensure snippet files are evaluated in the same order every time (for deterministic output)
69+
code_paths = sorted(lmfdb_dir.rglob("code*.yaml"))
6970
else:
7071
code_paths = [Path(yaml_file_path)]
7172
assert code_paths[0].exists(), f"Specified path {yaml_file_path} does not exist"

lmfdb/tests/snippet_tests/elliptic_curves/code-37.a1-magma.log

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ Mapping from: Abelian Group isomorphic to Z
99
Defined on 1 generator (free) to Set of points of E with coordinates in Rational Field given by a rule [no inverse]
1010
true true
1111
magma> Generators(E);
12-
[ (0 : -1 : 1) ]
12+
[ (0 : 0 : 1) ]
1313
true true
1414
magma> TorsionSubgroup(E);
1515
Abelian Group of order 1
1616
magma> IntegralPoints(E);
17-
[ (-1 : 0 : 1), (0 : -1 : 1), (1 : -1 : 1), (2 : 2 : 1), (6 : -15 : 1) ]
18-
[ <(-1 : 0 : 1), 1>, <(0 : -1 : 1), 1>, <(1 : -1 : 1), 1>, <(2 : 2 : 1), 1>, <(6 : -15 : 1), 1> ]
17+
[ (-1 : -1 : 1), (0 : 0 : 1), (1 : 0 : 1), (2 : -3 : 1), (6 : 14 : 1) ]
18+
[ <(-1 : -1 : 1), 1>, <(0 : 0 : 1), 1>, <(1 : 0 : 1), 1>, <(2 : -3 : 1), 1>, <(6 : 14 : 1), 1> ]
1919
magma> Conductor(E);
2020
37
2121
magma> Discriminant(E);
@@ -42,7 +42,7 @@ magma> Order(TorsionSubgroup(E));
4242
1
4343
magma> MordellWeilShaInformation(E);
4444
[ 1, 1 ]
45-
[ (0 : -1 : 1) ]
45+
[ (0 : 0 : 1) ]
4646
[
4747
<2, [ 0, 0 ]>
4848
]

0 commit comments

Comments
 (0)