Skip to content

Commit

Permalink
Check logs when testing variables
Browse files Browse the repository at this point in the history
  • Loading branch information
liZe committed Nov 25, 2023
1 parent 9979f37 commit a09ded7
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/test_variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
import pytest
from weasyprint.css.properties import KNOWN_PROPERTIES

from .testing_utils import render_pages as parse
from .testing_utils import assert_no_logs, render_pages as parse

SIDES = ('top', 'right', 'bottom', 'left')


@assert_no_logs
def test_variable_simple():
page, = parse('''
<style>
Expand All @@ -21,6 +22,7 @@ def test_variable_simple():
assert paragraph.width == 10


@assert_no_logs
def test_variable_inherit():
page, = parse('''
<style>
Expand All @@ -35,6 +37,7 @@ def test_variable_inherit():
assert paragraph.width == 10


@assert_no_logs
def test_variable_inherit_override():
page, = parse('''
<style>
Expand All @@ -49,6 +52,7 @@ def test_variable_inherit_override():
assert paragraph.width == 10


@assert_no_logs
def test_variable_case_sensitive():
page, = parse('''
<style>
Expand All @@ -64,6 +68,7 @@ def test_variable_case_sensitive():
assert paragraph.width == 10


@assert_no_logs
def test_variable_chain():
page, = parse('''
<style>
Expand All @@ -79,6 +84,7 @@ def test_variable_chain():
assert paragraph.width == 10


@assert_no_logs
def test_variable_chain_root():
# Regression test for https://github.com/Kozea/WeasyPrint/issues/1656
page, = parse('''
Expand All @@ -99,6 +105,7 @@ def test_variable_chain_root_missing():
''')


@assert_no_logs
def test_variable_partial_1():
page, = parse('''
<style>
Expand All @@ -116,6 +123,7 @@ def test_variable_partial_1():
assert div.margin_left == 10


@assert_no_logs
def test_variable_initial():
page, = parse('''
<style>
Expand Down

0 comments on commit a09ded7

Please sign in to comment.