Skip to content

Commit

Permalink
Remove use of base test where unneeded.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Jun 9, 2022
1 parent ad850e0 commit 3e17ced
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 25 deletions.
3 changes: 1 addition & 2 deletions cssutils/tests/test_cssproperties.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
"""Testcases for cssutils.css.cssproperties."""

from . import basetest
import cssutils.css
import cssutils.profiles
import pytest


class TestCSSProperties(basetest.BaseTestCase):
class TestCSSProperties:

# def test_cssvalues(self):
# "cssproperties cssvalues"
Expand Down
3 changes: 1 addition & 2 deletions cssutils/tests/test_cssrulelist.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
"""Testcases for cssutils.css.CSSRuleList"""

from . import basetest
import cssutils
import pytest


class TestCSSRuleList(basetest.BaseTestCase):
class TestCSSRuleList:
def test_init(self):
"CSSRuleList.__init__()"
r = cssutils.css.CSSRuleList()
Expand Down
4 changes: 2 additions & 2 deletions cssutils/tests/test_cssvalue.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ def test_reprANDstr(self):
assert cssText == s2.cssText


class TestCSSPrimitiveValue(basetest.BaseTestCase):
class TestCSSPrimitiveValue:
def test_init(self):
"CSSPrimitiveValue.__init__()"
v = cssutils.css.CSSPrimitiveValue('1')
Expand Down Expand Up @@ -854,7 +854,7 @@ def test_reprANDstr(self):
assert v == s2.cssText


class TestCSSValueList(basetest.BaseTestCase):
class TestCSSValueList:
def test_init(self):
"CSSValueList.__init__()"
v = cssutils.css.CSSValue(cssText='red blue')
Expand Down
3 changes: 1 addition & 2 deletions cssutils/tests/test_errorhandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@
import xml.dom
import socket

from . import basetest
import cssutils


class TestErrorHandler(basetest.BaseTestCase):
class TestErrorHandler:
def setup(self):
"replace default log and ignore its output"
self._oldlog = cssutils.log._log
Expand Down
3 changes: 1 addition & 2 deletions cssutils/tests/test_helper.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
"""Testcases for cssutils.helper"""

from . import basetest
from cssutils.helper import normalize, string, stringvalue, uri, urivalue


class TestHelper(basetest.BaseTestCase):
class TestHelper:
def test_normalize(self):
"helper._normalize()"
tests = {
Expand Down
3 changes: 1 addition & 2 deletions cssutils/tests/test_parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


import xml.dom
from . import basetest
import cssutils
import urllib.request
import urllib.error
Expand All @@ -11,7 +10,7 @@
import pytest


class TestCSSParser(basetest.BaseTestCase):
class TestCSSParser:
def _make_fetcher(self, encoding, content):
"make an URL fetcher with specified data"

Expand Down
9 changes: 4 additions & 5 deletions cssutils/tests/test_prodparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import sys
import re
import xml.dom
from . import basetest
from cssutils.prodparser import (
Prod,
Sequence,
Expand All @@ -16,7 +15,7 @@
import pytest


class TestProd(basetest.BaseTestCase):
class TestProd:
def test_init(self):
"Prod.__init__(...)"
p = Prod('min', lambda t, v: t == 1 and v == 2)
Expand Down Expand Up @@ -86,7 +85,7 @@ def test_matches(self):
assert p2.matches([0, 0, 0, 0]) is False


class TestSequence(basetest.BaseTestCase):
class TestSequence:
def test_init(self):
"Sequence.__init__()"
p1 = Prod('p1', lambda t, v: t == 1)
Expand Down Expand Up @@ -253,7 +252,7 @@ def test_nextProd(self):
assert p == seq.nextProd(t)


class TestChoice(basetest.BaseTestCase):
class TestChoice:
def test_init(self):
"Choice.__init__()"
p1 = Prod('p1', lambda t, v: t == 1)
Expand Down Expand Up @@ -349,7 +348,7 @@ def test_reset(self):
assert p2 == ch.nextProd(t2)


class TestProdParser(basetest.BaseTestCase):
class TestProdParser:
def setup(self):
pass

Expand Down
3 changes: 1 addition & 2 deletions cssutils/tests/test_profiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import pytest

import cssutils
from . import basetest

CSS2 = (cssutils.profile.CSS_LEVEL_2,)
C3BUI = (cssutils.profile.CSS3_BASIC_USER_INTERFACE,)
Expand All @@ -19,7 +18,7 @@
CSS2_FM3 = (FM3[0], CSS2[0])


class TestProfiles(basetest.BaseTestCase):
class TestProfiles:
M1 = {'testvalue': 'x'}
P1 = {
'-test-tokenmacro': '({num}{w}){1,2}',
Expand Down
3 changes: 1 addition & 2 deletions cssutils/tests/test_properties.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
"""Testcases for cssutils.css.property._Property."""

import copy
from . import basetest
import cssutils
from cssutils.css.property import Property

debug = False


class TestProperties(basetest.BaseTestCase):
class TestProperties:
def setup(self):
"init test values"
V = {
Expand Down
2 changes: 1 addition & 1 deletion cssutils/tests/test_scripts_csscombine.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import cssutils


class CSSCombine(basetest.BaseTestCase):
class CSSCombine:

C = '@namespace s2"uri";s2|sheet-1{top:1px}s2|sheet-2{top:2px}proxy{top:3px}'

Expand Down
2 changes: 1 addition & 1 deletion cssutils/tests/test_serialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ def test_validOnly(self):
self.do_equal_p(tests, raising=False)


class TestCSSSerializer(basetest.BaseTestCase):
class TestCSSSerializer:
"""
testcases for cssutils.CSSSerializer
"""
Expand Down
3 changes: 1 addition & 2 deletions cssutils/tests/test_stylesheet.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
"""Testcases for cssutils.stylesheets.StyleSheet"""

from . import basetest
import cssutils


class TestStyleSheet(basetest.BaseTestCase):
class TestStyleSheet:
def test_init(self):
"StyleSheet.__init__()"
s = cssutils.stylesheets.StyleSheet()
Expand Down

0 comments on commit 3e17ced

Please sign in to comment.