Skip to content

Commit

Permalink
tests: Add file docstring to test_*.py files that were missing it
Browse files Browse the repository at this point in the history
While at it, reoder import lines to better match the usual order
of having 'import ...' lines first, and then 'from ... import ...'
lines.
  • Loading branch information
jnareb committed Oct 10, 2024
1 parent 840236f commit 225f89e
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/test_annotate.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# -*- coding: utf-8 -*-
"""Test cases for 'src/diffannotator/annotate.py' module"""
import copy
import re
from pathlib import Path
from textwrap import dedent

from pygments.lexers import CLexer
from pygments.token import Token
import pytest
import unidiff
from pygments.lexers import CLexer
from pygments.token import Token

from diffannotator.annotate import (split_multiline_lex_tokens, line_ends_idx,
group_tokens_by_line, front_fill_gaps, deep_update,
Expand Down
5 changes: 5 additions & 0 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# -*- coding: utf-8 -*-
"""Test cases for all typer-based command line (CLI) scripts
https://typer.tiangolo.com/tutorial/testing/
"""
import subprocess
from pathlib import Path

Expand Down
2 changes: 2 additions & 0 deletions tests/test_gather_data.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-
"""Test cases for 'src/diffannotator/gather_data.py' module"""
from collections import Counter
from pathlib import Path

Expand Down
2 changes: 2 additions & 0 deletions tests/test_languages.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-
"""Test cases for 'src/diffannotator/languages.py' module"""
import logging
import pytest
from pytest import LogCaptureFixture
Expand Down
2 changes: 2 additions & 0 deletions tests/test_lexer.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-
"""Test cases for 'src/diffannotator/lexer.py' module"""
from textwrap import dedent

from pygments.lexer import Lexer as PygmentsLexer
Expand Down

0 comments on commit 225f89e

Please sign in to comment.