From a43cb126f5fe1b0d99d10129500d662a0ad12685 Mon Sep 17 00:00:00 2001 From: Will McGugan Date: Wed, 20 Jul 2022 19:08:10 +0100 Subject: [PATCH] test fix --- tests/css/test_parse.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/css/test_parse.py b/tests/css/test_parse.py index 986b3d663..bf5cc4505 100644 --- a/tests/css/test_parse.py +++ b/tests/css/test_parse.py @@ -4,7 +4,8 @@ import pytest from textual.color import Color -from textual.css.parse import substitute_references, TokenError +from textual.css.errors import UnresolvedVariableError +from textual.css.parse import substitute_references from textual.css.scalar import Scalar, Unit from textual.css.stylesheet import Stylesheet, StylesheetParseError from textual.css.tokenize import tokenize @@ -213,7 +214,7 @@ class TestVariableReferenceSubstitution: def test_undefined_variable(self): css = ".thing { border: $not-defined; }" - with pytest.raises(TokenError): + with pytest.raises(UnresolvedVariableError): list(substitute_references(tokenize(css, ""))) def test_transitive_reference(self):