From 2ba830595a8322225341656b05d12fc953507b9f Mon Sep 17 00:00:00 2001 From: Jan Domanski Date: Thu, 3 Aug 2023 10:10:41 +0100 Subject: [PATCH] fix a broken snapshot --- .../tests/snapshot/__snapshots__/test_gen_unit_tables.ambr | 6 ------ doc/source/scripts/tests/snapshot/test_gen_unit_tables.py | 3 ++- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/doc/source/scripts/tests/snapshot/__snapshots__/test_gen_unit_tables.ambr b/doc/source/scripts/tests/snapshot/__snapshots__/test_gen_unit_tables.ambr index b8d269559..d5515869b 100644 --- a/doc/source/scripts/tests/snapshot/__snapshots__/test_gen_unit_tables.ambr +++ b/doc/source/scripts/tests/snapshot/__snapshots__/test_gen_unit_tables.ambr @@ -1,12 +1,6 @@ # serializer version: 1 # name: test_write_unit_table list([ - tuple( - ''' - .. Generated by /Users/jandom/micromamba/envs/guide/lib/python3.9/site-packages/pytest/__main__.py - - ''', - ), tuple( ''' diff --git a/doc/source/scripts/tests/snapshot/test_gen_unit_tables.py b/doc/source/scripts/tests/snapshot/test_gen_unit_tables.py index b624c61c7..70381d0da 100644 --- a/doc/source/scripts/tests/snapshot/test_gen_unit_tables.py +++ b/doc/source/scripts/tests/snapshot/test_gen_unit_tables.py @@ -8,4 +8,5 @@ def test_write_unit_table(snapshot): write_unit_table(filename=Path()) lines = [args[0] for args in mock_open_file.return_value.write.call_args_list] - assert lines == snapshot + # Exclude the first line, because it contains "Generated by /home/username/..." + assert lines[1:] == snapshot