# Path: coaster/assets.py
# _VERSION_SPECIFIER_RE = re.compile('[<=>!*]')
# def split_namespec(namespec):
#     def __init__(self):
#     def _require_recursive(self, *namespecs):
#     def require(self, *namespecs):
#     def setup(self):
#     def output(self, _in, out, **kw):
# class AssetNotFound(Exception):  # noqa: N818
# class VersionedAssets(defaultdict):
# class UglipyJS(Filter):


from io import StringIO
from coaster.assets import AssetNotFound, UglipyJS, Version, VersionedAssets
import unittest
import pytest
        assert bundle.contents == ('jquery-1.8.3.js', 'jquery.form-2.96.js')

    def test_version_copies(self):
        # First asset will load highest available version of the requirement, which conflicts
        # with the second requested version. The same asset can't be requested twice
        with pytest.raises(ValueError):
            self.assets.require('jquery.form.js', 'jquery.js==1.7.1')

    def test_version_conflict(self):
        # First asset will load highest available version of the requirement, which conflicts
        # with the second requested version. The same asset can't be requested twice
        with pytest.raises(ValueError):
            self.assets.require('jquery.form.js', 'old-lib.js')

    def test_blacklist(self):
        bundle = self.assets.require('!jquery.js', 'jquery.form.js')
        assert bundle.contents == ('jquery.form-2.96.js',)
        bundle = self.assets.require('jquery.form.js', '!jquery.js')
        assert bundle.contents == ('jquery.form-2.96.js',)

    def test_uglipyjs(self):
        """Test the UglipyJS filter"""
        infile = StringIO(
            """
            function test() {
              alert("Hello, world!");
            };
            """
        )
        outfile = StringIO()

# Path: coaster/assets.py
# _VERSION_SPECIFIER_RE = re.compile('[<=>!*]')
# def split_namespec(namespec):
#     def __init__(self):
#     def _require_recursive(self, *namespecs):
#     def require(self, *namespecs):
#     def setup(self):
#     def output(self, _in, out, **kw):
# class AssetNotFound(Exception):  # noqa: N818
# class VersionedAssets(defaultdict):
# class UglipyJS(Filter):


# Path: tests/test_assets.py
from io import StringIO
from coaster.assets import AssetNotFound, UglipyJS, Version, VersionedAssets
import unittest
import pytest

        assert bundle.contents == ('jquery-1.8.3.js', 'jquery.form-2.96.js')

    def test_version_copies(self):
        # First asset will load highest available version of the requirement, which conflicts
        # with the second requested version. The same asset can't be requested twice
        with pytest.raises(ValueError):
            self.assets.require('jquery.form.js', 'jquery.js==1.7.1')

    def test_version_conflict(self):
        # First asset will load highest available version of the requirement, which conflicts
        # with the second requested version. The same asset can't be requested twice
        with pytest.raises(ValueError):
            self.assets.require('jquery.form.js', 'old-lib.js')

    def test_blacklist(self):
        bundle = self.assets.require('!jquery.js', 'jquery.form.js')
        assert bundle.contents == ('jquery.form-2.96.js',)
        bundle = self.assets.require('jquery.form.js', '!jquery.js')
        assert bundle.contents == ('jquery.form-2.96.js',)

    def test_uglipyjs(self):
        """Test the UglipyJS filter"""
        infile = StringIO(
            """
            function test() {
              alert("Hello, world!");
            };
            """
        )
        outfile = StringIO()

        afilter = UglipyJS()