We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fd35999 commit d8ce6acCopy full SHA for d8ce6ac
tests/test_cmdcomp.py
@@ -1,6 +1,9 @@
1
+import re
2
+
3
import pytest
4
from pytest import CaptureFixture
5
6
+from cmdcomp import __version__
7
from cmdcomp.app import App
8
from cmdcomp.shell import ShellType
9
from tests.conftest import SAMPLES_DIR
@@ -26,9 +29,10 @@ def test_application(
26
29
]
27
30
)
28
31
- assert (
- capsys.readouterr().out
- == open(SAMPLES_DIR / version / f"output.{str(shell.value)}").read()
32
+ assert capsys.readouterr().out == re.sub(
33
+ r'\n# Code generated by cmdcomp ".*"\. DO NOT EDIT\.\n',
34
+ f'\n# Code generated by cmdcomp "{__version__}". DO NOT EDIT.\n',
35
+ open(SAMPLES_DIR / version / f"output.{str(shell.value)}").read(),
36
37
38
def test_output_file_to_samples(
0 commit comments