From c1d34967d30ef0ee5f578c2f6f6beabbc36f6e33 Mon Sep 17 00:00:00 2001 From: Jerred Shepherd Date: Mon, 6 Nov 2023 13:31:57 -0800 Subject: [PATCH] tests: don't save version in snapshot --- .github/workflows/go.yml | 2 +- .snapshots/TestParse-appdirs_signed_tarball | 2 +- .snapshots/TestParse-appdirs_signed_wheel | 2 +- .snapshots/TestParse-appdirs_unsigned_tarball | 2 +- .snapshots/TestParse-appdirs_unsigned_wheel | 2 +- .../TestParse-cachetools_signed_tarball | 2 +- .snapshots/TestParse-cachetools_signed_wheel | 2 +- .../TestParse-cachetools_unsigned_tarball | 2 +- .../TestParse-cachetools_unsigned_wheel | 2 +- .snapshots/TestParse-chardet_signed_tarball | 2 +- .snapshots/TestParse-chardet_signed_wheel | 2 +- .snapshots/TestParse-chardet_unsigned_tarball | 2 +- .snapshots/TestParse-chardet_unsigned_wheel | 2 +- .snapshots/TestParse-click_signed_tarball | 2 +- .snapshots/TestParse-click_signed_wheel | 2 +- .snapshots/TestParse-click_unsigned_tarball | 2 +- .snapshots/TestParse-click_unsigned_wheel | 2 +- .../TestParse-configparser_signed_tarball | 2 +- .../TestParse-configparser_signed_wheel | 2 +- .../TestParse-configparser_unsigned_tarball | 2 +- .../TestParse-configparser_unsigned_wheel | 2 +- .../TestParse-coveragepy_signed_tarball | 2 +- .snapshots/TestParse-coveragepy_signed_wheel | 2 +- .../TestParse-coveragepy_unsigned_tarball | 2 +- .../TestParse-coveragepy_unsigned_wheel | 2 +- .snapshots/TestParse-decorator_signed_tarball | 2 +- .snapshots/TestParse-decorator_signed_wheel | 2 +- .../TestParse-decorator_unsigned_tarball | 2 +- .snapshots/TestParse-decorator_unsigned_wheel | 2 +- .../TestParse-defusedxml_signed_tarball | 2 +- .snapshots/TestParse-defusedxml_signed_wheel | 2 +- .../TestParse-defusedxml_unsigned_tarball | 2 +- .../TestParse-defusedxml_unsigned_wheel | 2 +- ...estParse-importlib_metadata_signed_tarball | 2 +- .../TestParse-importlib_metadata_signed_wheel | 2 +- ...tParse-importlib_metadata_unsigned_tarball | 2 +- ...estParse-importlib_metadata_unsigned_wheel | 2 +- .../TestParse-matplotlib_signed_tarball | 2 +- .snapshots/TestParse-matplotlib_signed_wheel | 2 +- .../TestParse-matplotlib_unsigned_tarball | 2 +- .../TestParse-matplotlib_unsigned_wheel | 2 +- .snapshots/TestParse-pytest_signed_tarball | 2 +- .snapshots/TestParse-pytest_signed_wheel | 2 +- .snapshots/TestParse-pytest_unsigned_tarball | 2 +- .snapshots/TestParse-pytest_unsigned_wheel | 2 +- .../TestParse-python-certifi_signed_tarball | 2 +- .../TestParse-python-certifi_signed_wheel | 2 +- .../TestParse-python-certifi_unsigned_tarball | 2 +- .../TestParse-python-certifi_unsigned_wheel | 2 +- parse_test.go | 23 +++++++++++-------- 50 files changed, 62 insertions(+), 59 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 0c2bb43..5306b99 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -6,7 +6,7 @@ on: - main pull_request: schedule: - - cron: "0 0 * * *" + - cron: "0 0 1 * *" # run on the first of each month jobs: test: diff --git a/.snapshots/TestParse-appdirs_signed_tarball b/.snapshots/TestParse-appdirs_signed_tarball index 02f1a04..3e6ef4d 100644 --- a/.snapshots/TestParse-appdirs_signed_tarball +++ b/.snapshots/TestParse-appdirs_signed_tarball @@ -85,7 +85,7 @@ (string) (len=97) "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." }, (string) (len=7) "version": ([]string) (len=1) { - (string) (len=5) "1.4.4" + (string) (len=14) "version exists" } }, GpgSignature: ([]uint8) (len=20) { diff --git a/.snapshots/TestParse-appdirs_signed_wheel b/.snapshots/TestParse-appdirs_signed_wheel index b2f9135..3379dd7 100644 --- a/.snapshots/TestParse-appdirs_signed_wheel +++ b/.snapshots/TestParse-appdirs_signed_wheel @@ -85,7 +85,7 @@ (string) (len=97) "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." }, (string) (len=7) "version": ([]string) (len=1) { - (string) (len=5) "1.4.4" + (string) (len=14) "version exists" } }, GpgSignature: ([]uint8) (len=20) { diff --git a/.snapshots/TestParse-appdirs_unsigned_tarball b/.snapshots/TestParse-appdirs_unsigned_tarball index 7183f40..3c59aa3 100644 --- a/.snapshots/TestParse-appdirs_unsigned_tarball +++ b/.snapshots/TestParse-appdirs_unsigned_tarball @@ -85,7 +85,7 @@ (string) (len=97) "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." }, (string) (len=7) "version": ([]string) (len=1) { - (string) (len=5) "1.4.4" + (string) (len=14) "version exists" } }, GpgSignature: ([]uint8) diff --git a/.snapshots/TestParse-appdirs_unsigned_wheel b/.snapshots/TestParse-appdirs_unsigned_wheel index 9a25bc2..544c045 100644 --- a/.snapshots/TestParse-appdirs_unsigned_wheel +++ b/.snapshots/TestParse-appdirs_unsigned_wheel @@ -85,7 +85,7 @@ (string) (len=97) "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." }, (string) (len=7) "version": ([]string) (len=1) { - (string) (len=5) "1.4.4" + (string) (len=14) "version exists" } }, GpgSignature: ([]uint8) diff --git a/.snapshots/TestParse-cachetools_signed_tarball b/.snapshots/TestParse-cachetools_signed_tarball index 685e555..eb72b95 100644 --- a/.snapshots/TestParse-cachetools_signed_tarball +++ b/.snapshots/TestParse-cachetools_signed_tarball @@ -83,7 +83,7 @@ (string) (len=47) "Extensible memoizing collections and decorators" }, (string) (len=7) "version": ([]string) (len=1) { - (string) (len=5) "5.3.2" + (string) (len=14) "version exists" } }, GpgSignature: ([]uint8) (len=20) { diff --git a/.snapshots/TestParse-cachetools_signed_wheel b/.snapshots/TestParse-cachetools_signed_wheel index 80a8edc..755cb5b 100644 --- a/.snapshots/TestParse-cachetools_signed_wheel +++ b/.snapshots/TestParse-cachetools_signed_wheel @@ -83,7 +83,7 @@ (string) (len=47) "Extensible memoizing collections and decorators" }, (string) (len=7) "version": ([]string) (len=1) { - (string) (len=5) "5.3.2" + (string) (len=14) "version exists" } }, GpgSignature: ([]uint8) (len=20) { diff --git a/.snapshots/TestParse-cachetools_unsigned_tarball b/.snapshots/TestParse-cachetools_unsigned_tarball index e5279fc..c793fad 100644 --- a/.snapshots/TestParse-cachetools_unsigned_tarball +++ b/.snapshots/TestParse-cachetools_unsigned_tarball @@ -83,7 +83,7 @@ (string) (len=47) "Extensible memoizing collections and decorators" }, (string) (len=7) "version": ([]string) (len=1) { - (string) (len=5) "5.3.2" + (string) (len=14) "version exists" } }, GpgSignature: ([]uint8) diff --git a/.snapshots/TestParse-cachetools_unsigned_wheel b/.snapshots/TestParse-cachetools_unsigned_wheel index 52d1dd0..9fc0dd3 100644 --- a/.snapshots/TestParse-cachetools_unsigned_wheel +++ b/.snapshots/TestParse-cachetools_unsigned_wheel @@ -83,7 +83,7 @@ (string) (len=47) "Extensible memoizing collections and decorators" }, (string) (len=7) "version": ([]string) (len=1) { - (string) (len=5) "5.3.2" + (string) (len=14) "version exists" } }, GpgSignature: ([]uint8) diff --git a/.snapshots/TestParse-chardet_signed_tarball b/.snapshots/TestParse-chardet_signed_tarball index 3b3d4f1..60f197f 100644 --- a/.snapshots/TestParse-chardet_signed_tarball +++ b/.snapshots/TestParse-chardet_signed_tarball @@ -89,7 +89,7 @@ (string) (len=40) "Universal encoding detector for Python 3" }, (string) (len=7) "version": ([]string) (len=1) { - (string) (len=10) "5.3.0.dev0" + (string) (len=14) "version exists" } }, GpgSignature: ([]uint8) (len=20) { diff --git a/.snapshots/TestParse-chardet_signed_wheel b/.snapshots/TestParse-chardet_signed_wheel index 9d826b3..81bfada 100644 --- a/.snapshots/TestParse-chardet_signed_wheel +++ b/.snapshots/TestParse-chardet_signed_wheel @@ -89,7 +89,7 @@ (string) (len=40) "Universal encoding detector for Python 3" }, (string) (len=7) "version": ([]string) (len=1) { - (string) (len=10) "5.3.0.dev0" + (string) (len=14) "version exists" } }, GpgSignature: ([]uint8) (len=20) { diff --git a/.snapshots/TestParse-chardet_unsigned_tarball b/.snapshots/TestParse-chardet_unsigned_tarball index 93cc1c6..d52af3d 100644 --- a/.snapshots/TestParse-chardet_unsigned_tarball +++ b/.snapshots/TestParse-chardet_unsigned_tarball @@ -89,7 +89,7 @@ (string) (len=40) "Universal encoding detector for Python 3" }, (string) (len=7) "version": ([]string) (len=1) { - (string) (len=10) "5.3.0.dev0" + (string) (len=14) "version exists" } }, GpgSignature: ([]uint8) diff --git a/.snapshots/TestParse-chardet_unsigned_wheel b/.snapshots/TestParse-chardet_unsigned_wheel index f4e1de9..c745923 100644 --- a/.snapshots/TestParse-chardet_unsigned_wheel +++ b/.snapshots/TestParse-chardet_unsigned_wheel @@ -89,7 +89,7 @@ (string) (len=40) "Universal encoding detector for Python 3" }, (string) (len=7) "version": ([]string) (len=1) { - (string) (len=10) "5.3.0.dev0" + (string) (len=14) "version exists" } }, GpgSignature: ([]uint8) diff --git a/.snapshots/TestParse-click_signed_tarball b/.snapshots/TestParse-click_signed_tarball index 0081d3b..3f280cd 100644 --- a/.snapshots/TestParse-click_signed_tarball +++ b/.snapshots/TestParse-click_signed_tarball @@ -85,7 +85,7 @@ (string) (len=41) "Composable command line interface toolkit" }, (string) (len=7) "version": ([]string) (len=1) { - (string) (len=10) "8.2.0.dev0" + (string) (len=14) "version exists" } }, GpgSignature: ([]uint8) (len=20) { diff --git a/.snapshots/TestParse-click_signed_wheel b/.snapshots/TestParse-click_signed_wheel index 66e8775..601681f 100644 --- a/.snapshots/TestParse-click_signed_wheel +++ b/.snapshots/TestParse-click_signed_wheel @@ -85,7 +85,7 @@ (string) (len=41) "Composable command line interface toolkit" }, (string) (len=7) "version": ([]string) (len=1) { - (string) (len=10) "8.2.0.dev0" + (string) (len=14) "version exists" } }, GpgSignature: ([]uint8) (len=20) { diff --git a/.snapshots/TestParse-click_unsigned_tarball b/.snapshots/TestParse-click_unsigned_tarball index bb200ce..9805d81 100644 --- a/.snapshots/TestParse-click_unsigned_tarball +++ b/.snapshots/TestParse-click_unsigned_tarball @@ -85,7 +85,7 @@ (string) (len=41) "Composable command line interface toolkit" }, (string) (len=7) "version": ([]string) (len=1) { - (string) (len=10) "8.2.0.dev0" + (string) (len=14) "version exists" } }, GpgSignature: ([]uint8) diff --git a/.snapshots/TestParse-click_unsigned_wheel b/.snapshots/TestParse-click_unsigned_wheel index 0334e2a..b31a954 100644 --- a/.snapshots/TestParse-click_unsigned_wheel +++ b/.snapshots/TestParse-click_unsigned_wheel @@ -85,7 +85,7 @@ (string) (len=41) "Composable command line interface toolkit" }, (string) (len=7) "version": ([]string) (len=1) { - (string) (len=10) "8.2.0.dev0" + (string) (len=14) "version exists" } }, GpgSignature: ([]uint8) diff --git a/.snapshots/TestParse-configparser_signed_tarball b/.snapshots/TestParse-configparser_signed_tarball index cf9d682..df56c17 100644 --- a/.snapshots/TestParse-configparser_signed_tarball +++ b/.snapshots/TestParse-configparser_signed_tarball @@ -98,7 +98,7 @@ (string) (len=53) "Updated configparser from stdlib for earlier Pythons." }, (string) (len=7) "version": ([]string) (len=1) { - (string) (len=20) "6.0.1.dev11+g8411aec" + (string) (len=14) "version exists" } }, GpgSignature: ([]uint8) (len=20) { diff --git a/.snapshots/TestParse-configparser_signed_wheel b/.snapshots/TestParse-configparser_signed_wheel index 9b40eed..bb6c214 100644 --- a/.snapshots/TestParse-configparser_signed_wheel +++ b/.snapshots/TestParse-configparser_signed_wheel @@ -98,7 +98,7 @@ (string) (len=53) "Updated configparser from stdlib for earlier Pythons." }, (string) (len=7) "version": ([]string) (len=1) { - (string) (len=20) "6.0.1.dev11+g8411aec" + (string) (len=14) "version exists" } }, GpgSignature: ([]uint8) (len=20) { diff --git a/.snapshots/TestParse-configparser_unsigned_tarball b/.snapshots/TestParse-configparser_unsigned_tarball index ff65644..5eefa6c 100644 --- a/.snapshots/TestParse-configparser_unsigned_tarball +++ b/.snapshots/TestParse-configparser_unsigned_tarball @@ -98,7 +98,7 @@ (string) (len=53) "Updated configparser from stdlib for earlier Pythons." }, (string) (len=7) "version": ([]string) (len=1) { - (string) (len=20) "6.0.1.dev11+g8411aec" + (string) (len=14) "version exists" } }, GpgSignature: ([]uint8) diff --git a/.snapshots/TestParse-configparser_unsigned_wheel b/.snapshots/TestParse-configparser_unsigned_wheel index 0cd5dd8..2138c4c 100644 --- a/.snapshots/TestParse-configparser_unsigned_wheel +++ b/.snapshots/TestParse-configparser_unsigned_wheel @@ -98,7 +98,7 @@ (string) (len=53) "Updated configparser from stdlib for earlier Pythons." }, (string) (len=7) "version": ([]string) (len=1) { - (string) (len=20) "6.0.1.dev11+g8411aec" + (string) (len=14) "version exists" } }, GpgSignature: ([]uint8) diff --git a/.snapshots/TestParse-coveragepy_signed_tarball b/.snapshots/TestParse-coveragepy_signed_tarball index 2fbd9be..4234ced 100644 --- a/.snapshots/TestParse-coveragepy_signed_tarball +++ b/.snapshots/TestParse-coveragepy_signed_tarball @@ -98,7 +98,7 @@ (string) (len=36) "Code coverage measurement for Python" }, (string) (len=7) "version": ([]string) (len=1) { - (string) (len=12) "7.3.3a0.dev1" + (string) (len=14) "version exists" } }, GpgSignature: ([]uint8) (len=20) { diff --git a/.snapshots/TestParse-coveragepy_signed_wheel b/.snapshots/TestParse-coveragepy_signed_wheel index e7bbaa2..e9cbead 100644 --- a/.snapshots/TestParse-coveragepy_signed_wheel +++ b/.snapshots/TestParse-coveragepy_signed_wheel @@ -98,7 +98,7 @@ (string) (len=36) "Code coverage measurement for Python" }, (string) (len=7) "version": ([]string) (len=1) { - (string) (len=12) "7.3.3a0.dev1" + (string) (len=14) "version exists" } }, GpgSignature: ([]uint8) (len=20) { diff --git a/.snapshots/TestParse-coveragepy_unsigned_tarball b/.snapshots/TestParse-coveragepy_unsigned_tarball index 1aed25a..8941448 100644 --- a/.snapshots/TestParse-coveragepy_unsigned_tarball +++ b/.snapshots/TestParse-coveragepy_unsigned_tarball @@ -98,7 +98,7 @@ (string) (len=36) "Code coverage measurement for Python" }, (string) (len=7) "version": ([]string) (len=1) { - (string) (len=12) "7.3.3a0.dev1" + (string) (len=14) "version exists" } }, GpgSignature: ([]uint8) diff --git a/.snapshots/TestParse-coveragepy_unsigned_wheel b/.snapshots/TestParse-coveragepy_unsigned_wheel index 5fa61fa..79be8ab 100644 --- a/.snapshots/TestParse-coveragepy_unsigned_wheel +++ b/.snapshots/TestParse-coveragepy_unsigned_wheel @@ -98,7 +98,7 @@ (string) (len=36) "Code coverage measurement for Python" }, (string) (len=7) "version": ([]string) (len=1) { - (string) (len=12) "7.3.3a0.dev1" + (string) (len=14) "version exists" } }, GpgSignature: ([]uint8) diff --git a/.snapshots/TestParse-decorator_signed_tarball b/.snapshots/TestParse-decorator_signed_tarball index 852e6f4..eeb0737 100644 --- a/.snapshots/TestParse-decorator_signed_tarball +++ b/.snapshots/TestParse-decorator_signed_tarball @@ -87,7 +87,7 @@ (string) (len=21) "Decorators for Humans" }, (string) (len=7) "version": ([]string) (len=1) { - (string) (len=5) "5.1.1" + (string) (len=14) "version exists" } }, GpgSignature: ([]uint8) (len=20) { diff --git a/.snapshots/TestParse-decorator_signed_wheel b/.snapshots/TestParse-decorator_signed_wheel index 577d7e3..f5c6b51 100644 --- a/.snapshots/TestParse-decorator_signed_wheel +++ b/.snapshots/TestParse-decorator_signed_wheel @@ -87,7 +87,7 @@ (string) (len=21) "Decorators for Humans" }, (string) (len=7) "version": ([]string) (len=1) { - (string) (len=5) "5.1.1" + (string) (len=14) "version exists" } }, GpgSignature: ([]uint8) (len=20) { diff --git a/.snapshots/TestParse-decorator_unsigned_tarball b/.snapshots/TestParse-decorator_unsigned_tarball index 24d03a9..4a49f29 100644 --- a/.snapshots/TestParse-decorator_unsigned_tarball +++ b/.snapshots/TestParse-decorator_unsigned_tarball @@ -87,7 +87,7 @@ (string) (len=21) "Decorators for Humans" }, (string) (len=7) "version": ([]string) (len=1) { - (string) (len=5) "5.1.1" + (string) (len=14) "version exists" } }, GpgSignature: ([]uint8) diff --git a/.snapshots/TestParse-decorator_unsigned_wheel b/.snapshots/TestParse-decorator_unsigned_wheel index 851afdd..0b149c0 100644 --- a/.snapshots/TestParse-decorator_unsigned_wheel +++ b/.snapshots/TestParse-decorator_unsigned_wheel @@ -87,7 +87,7 @@ (string) (len=21) "Decorators for Humans" }, (string) (len=7) "version": ([]string) (len=1) { - (string) (len=5) "5.1.1" + (string) (len=14) "version exists" } }, GpgSignature: ([]uint8) diff --git a/.snapshots/TestParse-defusedxml_signed_tarball b/.snapshots/TestParse-defusedxml_signed_tarball index 4271172..288ac26 100644 --- a/.snapshots/TestParse-defusedxml_signed_tarball +++ b/.snapshots/TestParse-defusedxml_signed_tarball @@ -86,7 +86,7 @@ (string) (len=45) "XML bomb protection for Python stdlib modules" }, (string) (len=7) "version": ([]string) (len=1) { - (string) (len=8) "0.8.0rc2" + (string) (len=14) "version exists" } }, GpgSignature: ([]uint8) (len=20) { diff --git a/.snapshots/TestParse-defusedxml_signed_wheel b/.snapshots/TestParse-defusedxml_signed_wheel index f6b7fb5..26ef739 100644 --- a/.snapshots/TestParse-defusedxml_signed_wheel +++ b/.snapshots/TestParse-defusedxml_signed_wheel @@ -86,7 +86,7 @@ (string) (len=45) "XML bomb protection for Python stdlib modules" }, (string) (len=7) "version": ([]string) (len=1) { - (string) (len=8) "0.8.0rc2" + (string) (len=14) "version exists" } }, GpgSignature: ([]uint8) (len=20) { diff --git a/.snapshots/TestParse-defusedxml_unsigned_tarball b/.snapshots/TestParse-defusedxml_unsigned_tarball index a3a43b1..c970acb 100644 --- a/.snapshots/TestParse-defusedxml_unsigned_tarball +++ b/.snapshots/TestParse-defusedxml_unsigned_tarball @@ -86,7 +86,7 @@ (string) (len=45) "XML bomb protection for Python stdlib modules" }, (string) (len=7) "version": ([]string) (len=1) { - (string) (len=8) "0.8.0rc2" + (string) (len=14) "version exists" } }, GpgSignature: ([]uint8) diff --git a/.snapshots/TestParse-defusedxml_unsigned_wheel b/.snapshots/TestParse-defusedxml_unsigned_wheel index 2967781..50aecee 100644 --- a/.snapshots/TestParse-defusedxml_unsigned_wheel +++ b/.snapshots/TestParse-defusedxml_unsigned_wheel @@ -86,7 +86,7 @@ (string) (len=45) "XML bomb protection for Python stdlib modules" }, (string) (len=7) "version": ([]string) (len=1) { - (string) (len=8) "0.8.0rc2" + (string) (len=14) "version exists" } }, GpgSignature: ([]uint8) diff --git a/.snapshots/TestParse-importlib_metadata_signed_tarball b/.snapshots/TestParse-importlib_metadata_signed_tarball index 2f9b6c4..ae0e78f 100644 --- a/.snapshots/TestParse-importlib_metadata_signed_tarball +++ b/.snapshots/TestParse-importlib_metadata_signed_tarball @@ -103,7 +103,7 @@ (string) (len=34) "Read metadata from Python packages" }, (string) (len=7) "version": ([]string) (len=1) { - (string) (len=20) "6.8.1.dev17+g353c3df" + (string) (len=14) "version exists" } }, GpgSignature: ([]uint8) (len=20) { diff --git a/.snapshots/TestParse-importlib_metadata_signed_wheel b/.snapshots/TestParse-importlib_metadata_signed_wheel index 5404473..f99a665 100644 --- a/.snapshots/TestParse-importlib_metadata_signed_wheel +++ b/.snapshots/TestParse-importlib_metadata_signed_wheel @@ -103,7 +103,7 @@ (string) (len=34) "Read metadata from Python packages" }, (string) (len=7) "version": ([]string) (len=1) { - (string) (len=20) "6.8.1.dev17+g353c3df" + (string) (len=14) "version exists" } }, GpgSignature: ([]uint8) (len=20) { diff --git a/.snapshots/TestParse-importlib_metadata_unsigned_tarball b/.snapshots/TestParse-importlib_metadata_unsigned_tarball index ecb6e2c..2f0b2e1 100644 --- a/.snapshots/TestParse-importlib_metadata_unsigned_tarball +++ b/.snapshots/TestParse-importlib_metadata_unsigned_tarball @@ -103,7 +103,7 @@ (string) (len=34) "Read metadata from Python packages" }, (string) (len=7) "version": ([]string) (len=1) { - (string) (len=20) "6.8.1.dev17+g353c3df" + (string) (len=14) "version exists" } }, GpgSignature: ([]uint8) diff --git a/.snapshots/TestParse-importlib_metadata_unsigned_wheel b/.snapshots/TestParse-importlib_metadata_unsigned_wheel index c7cf671..024727b 100644 --- a/.snapshots/TestParse-importlib_metadata_unsigned_wheel +++ b/.snapshots/TestParse-importlib_metadata_unsigned_wheel @@ -103,7 +103,7 @@ (string) (len=34) "Read metadata from Python packages" }, (string) (len=7) "version": ([]string) (len=1) { - (string) (len=20) "6.8.1.dev17+g353c3df" + (string) (len=14) "version exists" } }, GpgSignature: ([]uint8) diff --git a/.snapshots/TestParse-matplotlib_signed_tarball b/.snapshots/TestParse-matplotlib_signed_tarball index 34b36dd..e7b8e2c 100644 --- a/.snapshots/TestParse-matplotlib_signed_tarball +++ b/.snapshots/TestParse-matplotlib_signed_tarball @@ -110,7 +110,7 @@ (string) (len=23) "Python plotting package" }, (string) (len=7) "version": ([]string) (len=1) { - (string) (len=10) "3.9.0.dev0" + (string) (len=14) "version exists" } }, GpgSignature: ([]uint8) (len=20) { diff --git a/.snapshots/TestParse-matplotlib_signed_wheel b/.snapshots/TestParse-matplotlib_signed_wheel index e913a4f..91ff609 100644 --- a/.snapshots/TestParse-matplotlib_signed_wheel +++ b/.snapshots/TestParse-matplotlib_signed_wheel @@ -110,7 +110,7 @@ (string) (len=23) "Python plotting package" }, (string) (len=7) "version": ([]string) (len=1) { - (string) (len=10) "3.9.0.dev0" + (string) (len=14) "version exists" } }, GpgSignature: ([]uint8) (len=20) { diff --git a/.snapshots/TestParse-matplotlib_unsigned_tarball b/.snapshots/TestParse-matplotlib_unsigned_tarball index b9b8c1c..76fc46c 100644 --- a/.snapshots/TestParse-matplotlib_unsigned_tarball +++ b/.snapshots/TestParse-matplotlib_unsigned_tarball @@ -110,7 +110,7 @@ (string) (len=23) "Python plotting package" }, (string) (len=7) "version": ([]string) (len=1) { - (string) (len=10) "3.9.0.dev0" + (string) (len=14) "version exists" } }, GpgSignature: ([]uint8) diff --git a/.snapshots/TestParse-matplotlib_unsigned_wheel b/.snapshots/TestParse-matplotlib_unsigned_wheel index e6aadd2..dd5eacb 100644 --- a/.snapshots/TestParse-matplotlib_unsigned_wheel +++ b/.snapshots/TestParse-matplotlib_unsigned_wheel @@ -110,7 +110,7 @@ (string) (len=23) "Python plotting package" }, (string) (len=7) "version": ([]string) (len=1) { - (string) (len=10) "3.9.0.dev0" + (string) (len=14) "version exists" } }, GpgSignature: ([]uint8) diff --git a/.snapshots/TestParse-pytest_signed_tarball b/.snapshots/TestParse-pytest_signed_tarball index 86c2b3a..77ff030 100644 --- a/.snapshots/TestParse-pytest_signed_tarball +++ b/.snapshots/TestParse-pytest_signed_tarball @@ -118,7 +118,7 @@ (string) (len=43) "pytest: simple powerful testing with Python" }, (string) (len=7) "version": ([]string) (len=1) { - (string) (len=23) "8.0.0.dev305+g8fb7e8b31" + (string) (len=14) "version exists" } }, GpgSignature: ([]uint8) (len=20) { diff --git a/.snapshots/TestParse-pytest_signed_wheel b/.snapshots/TestParse-pytest_signed_wheel index 0ed5fcc..622f925 100644 --- a/.snapshots/TestParse-pytest_signed_wheel +++ b/.snapshots/TestParse-pytest_signed_wheel @@ -118,7 +118,7 @@ (string) (len=43) "pytest: simple powerful testing with Python" }, (string) (len=7) "version": ([]string) (len=1) { - (string) (len=23) "8.0.0.dev305+g8fb7e8b31" + (string) (len=14) "version exists" } }, GpgSignature: ([]uint8) (len=20) { diff --git a/.snapshots/TestParse-pytest_unsigned_tarball b/.snapshots/TestParse-pytest_unsigned_tarball index 157bc22..267667a 100644 --- a/.snapshots/TestParse-pytest_unsigned_tarball +++ b/.snapshots/TestParse-pytest_unsigned_tarball @@ -118,7 +118,7 @@ (string) (len=43) "pytest: simple powerful testing with Python" }, (string) (len=7) "version": ([]string) (len=1) { - (string) (len=23) "8.0.0.dev305+g8fb7e8b31" + (string) (len=14) "version exists" } }, GpgSignature: ([]uint8) diff --git a/.snapshots/TestParse-pytest_unsigned_wheel b/.snapshots/TestParse-pytest_unsigned_wheel index e706727..dc05970 100644 --- a/.snapshots/TestParse-pytest_unsigned_wheel +++ b/.snapshots/TestParse-pytest_unsigned_wheel @@ -118,7 +118,7 @@ (string) (len=43) "pytest: simple powerful testing with Python" }, (string) (len=7) "version": ([]string) (len=1) { - (string) (len=23) "8.0.0.dev305+g8fb7e8b31" + (string) (len=14) "version exists" } }, GpgSignature: ([]uint8) diff --git a/.snapshots/TestParse-python-certifi_signed_tarball b/.snapshots/TestParse-python-certifi_signed_tarball index 2dc120f..ea9eece 100644 --- a/.snapshots/TestParse-python-certifi_signed_tarball +++ b/.snapshots/TestParse-python-certifi_signed_tarball @@ -85,7 +85,7 @@ (string) (len=49) "Python package for providing Mozilla's CA Bundle." }, (string) (len=7) "version": ([]string) (len=1) { - (string) (len=9) "2023.7.22" + (string) (len=14) "version exists" } }, GpgSignature: ([]uint8) (len=20) { diff --git a/.snapshots/TestParse-python-certifi_signed_wheel b/.snapshots/TestParse-python-certifi_signed_wheel index 094a601..7185690 100644 --- a/.snapshots/TestParse-python-certifi_signed_wheel +++ b/.snapshots/TestParse-python-certifi_signed_wheel @@ -85,7 +85,7 @@ (string) (len=49) "Python package for providing Mozilla's CA Bundle." }, (string) (len=7) "version": ([]string) (len=1) { - (string) (len=9) "2023.7.22" + (string) (len=14) "version exists" } }, GpgSignature: ([]uint8) (len=20) { diff --git a/.snapshots/TestParse-python-certifi_unsigned_tarball b/.snapshots/TestParse-python-certifi_unsigned_tarball index 6408c1a..4b3eed5 100644 --- a/.snapshots/TestParse-python-certifi_unsigned_tarball +++ b/.snapshots/TestParse-python-certifi_unsigned_tarball @@ -85,7 +85,7 @@ (string) (len=49) "Python package for providing Mozilla's CA Bundle." }, (string) (len=7) "version": ([]string) (len=1) { - (string) (len=9) "2023.7.22" + (string) (len=14) "version exists" } }, GpgSignature: ([]uint8) diff --git a/.snapshots/TestParse-python-certifi_unsigned_wheel b/.snapshots/TestParse-python-certifi_unsigned_wheel index a203990..3fff540 100644 --- a/.snapshots/TestParse-python-certifi_unsigned_wheel +++ b/.snapshots/TestParse-python-certifi_unsigned_wheel @@ -85,7 +85,7 @@ (string) (len=49) "Python package for providing Mozilla's CA Bundle." }, (string) (len=7) "version": ([]string) (len=1) { - (string) (len=9) "2023.7.22" + (string) (len=14) "version exists" } }, GpgSignature: ([]uint8) diff --git a/parse_test.go b/parse_test.go index 6a79e7d..94a9599 100644 --- a/parse_test.go +++ b/parse_test.go @@ -19,10 +19,9 @@ import ( "net/http" "net/http/httptest" "net/url" - "path" - "os" "os/exec" + "path" "path/filepath" "testing" ) @@ -78,7 +77,7 @@ func getArtifactPath(path string, extension string) (string, error) { }) if len(artifacts) != 1 { - return "", fmt.Errorf("expected exactly 1 ParserData with extension %s in %s, but found %d", extension, path, len(artifacts)) + return "", fmt.Errorf("expected exactly 1 file with extension %s in %s, but found %d", extension, path, len(artifacts)) } return fmt.Sprintf("%s%s", path, artifacts[0].Name()), nil @@ -113,7 +112,7 @@ func buildDistribution(directory string) error { return nil } -// signDistribution will use gpg to sign a ParserData, and return the path to the resulting `.asc` ParserData +// signDistribution will use gpg to sign a file, and return the path to the resulting `.asc` file func signDistribution(file string) (string, error) { signatureFile := fmt.Sprintf("%s.asc", file) @@ -272,7 +271,7 @@ func checkRequirements() error { } // createDistribution builds a Python distribution and optionally signs it. -// The method returns the location of the directory, built artifact, and signature ParserData if any. +// The method returns the location of the directory, built artifact, and signature file if any. func createDistribution(repositoryUrl string, format string, isSigned bool) (string, string, error) { repoUrl := repositoryUrl repositoryName := toRepositoryName(repoUrl) @@ -339,19 +338,23 @@ type ParserData struct { GpgSignature []byte } -// filterNondeterministicData replaces some generated fields with static strings -func filterNondeterministicData(data ParserData) ParserData { +// filterData replaces some generated fields with static strings +func filterData(data ParserData) ParserData { copiedData := maps.Clone(data.Metadata) fields := []string{ "blake2_256_digest", "md5_digest", "sha256_digest", + "version", } for _, field := range fields { - if _, ok := copiedData[field]; ok { - copiedData[field] = []string{fmt.Sprintf("%s exists", field)} + if value, ok := copiedData[field]; ok { + values := lo.Map(value, func(_ string, _ int) string { + return fmt.Sprintf("%s exists", field) + }) + copiedData[field] = values } } @@ -411,7 +414,7 @@ func TestParse(t *testing.T) { // compare against the normalized outputs to account for expects differences between the two parsers assert.Empty(t, cmp.Diff(expectedMetadata, actualMetadata)) - cupaloy.SnapshotT(t, filterNondeterministicData(actualMetadata)) + cupaloy.SnapshotT(t, filterData(actualMetadata)) }) } }