Skip to content

Commit

Permalink
Update tests to account for latest Ruff and Pygments updates (#2379)
Browse files Browse the repository at this point in the history
- Fix warning in Ruff
- Fix test expectations of Pygments lexer output

Fixes #2378
  • Loading branch information
facelessuser committed May 5, 2024
1 parent 8ed2fcb commit f1e2fad
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ extend-exclude = [
"dist/*"
]

select = [
lint.select = [
"A", # flake8-builtins
"B", # flake8-bugbear
"D", # pydocstyle
Expand All @@ -105,7 +105,7 @@ select = [
"PERF" # Perflint
]

ignore = [
lint.ignore = [
"E741",
"D202",
"D401",
Expand Down
8 changes: 4 additions & 4 deletions tests/test_extensions/test_highlight.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ def test_guess(self):
```
''',
'''
<div class="highlight"><pre><span></span><code><span class="kn">import</span> <span class="nn">test</span>
<div class="highlight"><pre><span></span><code><span class="kn">import</span><span class="w"> </span><span class="nn">test</span>
<span class="n">test</span><span class="o">.</span><span class="n">test</span><span class="p">()</span>
</code></pre></div>
''',
''', # noqa: E501
True
)

Expand All @@ -52,10 +52,10 @@ def test_guess_block(self):
```
''',
'''
<div class="highlight"><pre><span></span><code><span class="kn">import</span> <span class="nn">test</span>
<div class="highlight"><pre><span></span><code><span class="kn">import</span><span class="w"> </span><span class="nn">test</span>
<span class="n">test</span><span class="o">.</span><span class="n">test</span><span class="p">()</span>
</code></pre></div>
''',
''', # noqa: E501
True
)

Expand Down
4 changes: 2 additions & 2 deletions tests/test_extensions/test_inlinehilite.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ def test_guessing(self):

self.check_markdown(
r'`import module`.',
r'<p><code class="inlinehilite"><span class="kn">import</span> <span class="nn">module</span></code>.</p>'
r'<p><code class="inlinehilite"><span class="kn">import</span><span class="w"> </span><span class="nn">module</span></code>.</p>' # noqa: E501
)


Expand All @@ -251,7 +251,7 @@ def test_guessing_inline(self):

self.check_markdown(
r'`import module`.',
r'<p><code class="inlinehilite"><span class="kn">import</span> <span class="nn">module</span></code>.</p>'
r'<p><code class="inlinehilite"><span class="kn">import</span><span class="w"> </span><span class="nn">module</span></code>.</p>' # noqa: E501
)

def test_no_guessing_block(self):
Expand Down

0 comments on commit f1e2fad

Please sign in to comment.