Skip to content

Commit

Permalink
Remove a bunch of stuff to just test the failure.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Jun 1, 2024
1 parent 5fbd9c0 commit 9c78ec6
Show file tree
Hide file tree
Showing 156 changed files with 6 additions and 39,815 deletions.
43 changes: 0 additions & 43 deletions conftest.py
Original file line number Diff line number Diff line change
@@ -1,43 +0,0 @@
import importlib

import pytest

import cssutils

collect_ignore = [
'cssutils/_fetchgae.py',
'tools',
]


try:
importlib.import_module('lxml.etree')
except ImportError:
collect_ignore += ['examples/style.py']


@pytest.fixture(autouse=True)
def hermetic_profiles():
"""
Ensure that tests are hermetic w.r.t. profiles.
"""
before = list(cssutils.profile.profiles)
yield
assert before == cssutils.profile.profiles


@pytest.fixture
def saved_profiles(monkeypatch):
profiles = cssutils.profiles.Profiles(log=cssutils.log)
monkeypatch.setattr(cssutils, 'profile', profiles)


@pytest.fixture(autouse=True)
def raise_exceptions():
# configure log to raise exceptions
cssutils.log.raiseExceptions = True


@pytest.fixture(autouse=True)
def restore_serializer_preference_defaults():
cssutils.ser.prefs.useDefaults()

0 comments on commit 9c78ec6

Please sign in to comment.