2121
2222import sass
2323import sassc
24- from sassutils import sass_types
2524from sassutils .builder import Manifest , build_directory
2625from sassutils .wsgi import SassMiddleware
2726
@@ -788,57 +787,57 @@ def test_raises_typeerror_star_kwargs(self):
788787
789788class SassTypesTest (unittest .TestCase ):
790789 def test_number_no_conversion (self ):
791- num = sass_types .SassNumber (123. , u'px' )
790+ num = sass .SassNumber (123. , u'px' )
792791 assert type (num .value ) is float , type (num .value )
793792 assert type (num .unit ) is text_type , type (num .unit )
794793
795794 def test_number_conversion (self ):
796- num = sass_types .SassNumber (123 , b'px' )
795+ num = sass .SassNumber (123 , b'px' )
797796 assert type (num .value ) is float , type (num .value )
798797 assert type (num .unit ) is text_type , type (num .unit )
799798
800799 def test_color_no_conversion (self ):
801- color = sass_types .SassColor (1. , 2. , 3. , .5 )
800+ color = sass .SassColor (1. , 2. , 3. , .5 )
802801 assert type (color .r ) is float , type (color .r )
803802 assert type (color .g ) is float , type (color .g )
804803 assert type (color .b ) is float , type (color .b )
805804 assert type (color .a ) is float , type (color .a )
806805
807806 def test_color_conversion (self ):
808- color = sass_types .SassColor (1 , 2 , 3 , 1 )
807+ color = sass .SassColor (1 , 2 , 3 , 1 )
809808 assert type (color .r ) is float , type (color .r )
810809 assert type (color .g ) is float , type (color .g )
811810 assert type (color .b ) is float , type (color .b )
812811 assert type (color .a ) is float , type (color .a )
813812
814813 def test_sass_list_no_conversion (self ):
815- lst = sass_types .SassList (
816- ('foo' , 'bar' ), sass_types .SASS_SEPARATOR_COMMA ,
814+ lst = sass .SassList (
815+ ('foo' , 'bar' ), sass .SASS_SEPARATOR_COMMA ,
817816 )
818817 assert type (lst .items ) is tuple , type (lst .items )
819- assert lst .separator is sass_types .SASS_SEPARATOR_COMMA , lst .separator
818+ assert lst .separator is sass .SASS_SEPARATOR_COMMA , lst .separator
820819
821820 def test_sass_list_conversion (self ):
822- lst = sass_types .SassList (
823- ['foo' , 'bar' ], sass_types .SASS_SEPARATOR_SPACE ,
821+ lst = sass .SassList (
822+ ['foo' , 'bar' ], sass .SASS_SEPARATOR_SPACE ,
824823 )
825824 assert type (lst .items ) is tuple , type (lst .items )
826- assert lst .separator is sass_types .SASS_SEPARATOR_SPACE , lst .separator
825+ assert lst .separator is sass .SASS_SEPARATOR_SPACE , lst .separator
827826
828827 def test_sass_warning_no_conversion (self ):
829- warn = sass_types .SassWarning (u'error msg' )
828+ warn = sass .SassWarning (u'error msg' )
830829 assert type (warn .msg ) is text_type , type (warn .msg )
831830
832831 def test_sass_warning_no_conversion (self ):
833- warn = sass_types .SassWarning (b'error msg' )
832+ warn = sass .SassWarning (b'error msg' )
834833 assert type (warn .msg ) is text_type , type (warn .msg )
835834
836835 def test_sass_error_no_conversion (self ):
837- err = sass_types .SassError (u'error msg' )
836+ err = sass .SassError (u'error msg' )
838837 assert type (err .msg ) is text_type , type (err .msg )
839838
840839 def test_sass_error_conversion (self ):
841- err = sass_types .SassError (b'error msg' )
840+ err = sass .SassError (b'error msg' )
842841 assert type (err .msg ) is text_type , type (err .msg )
843842
844843
@@ -855,25 +854,25 @@ def identity(x):
855854
856855custom_functions = {
857856 'raises' : lambda : raise_exc (AssertionError ('foo' )),
858- 'returns_warning' : lambda : sass_types .SassWarning ('This is a warning' ),
859- 'returns_error' : lambda : sass_types .SassError ('This is an error' ),
857+ 'returns_warning' : lambda : sass .SassWarning ('This is a warning' ),
858+ 'returns_error' : lambda : sass .SassError ('This is an error' ),
860859 # Tuples are a not-supported type.
861860 'returns_unknown' : lambda : (1 , 2 , 3 ),
862861 'returns_true' : lambda : True ,
863862 'returns_false' : lambda : False ,
864863 'returns_none' : lambda : None ,
865864 'returns_unicode' : lambda : u'☃' ,
866865 'returns_bytes' : lambda : u'☃' .encode ('UTF-8' ),
867- 'returns_number' : lambda : sass_types .SassNumber (5 , 'px' ),
868- 'returns_color' : lambda : sass_types .SassColor (1 , 2 , 3 , .5 ),
869- 'returns_comma_list' : lambda : sass_types .SassList (
870- ('Arial' , 'sans-serif' ), sass_types .SASS_SEPARATOR_COMMA ,
866+ 'returns_number' : lambda : sass .SassNumber (5 , 'px' ),
867+ 'returns_color' : lambda : sass .SassColor (1 , 2 , 3 , .5 ),
868+ 'returns_comma_list' : lambda : sass .SassList (
869+ ('Arial' , 'sans-serif' ), sass .SASS_SEPARATOR_COMMA ,
871870 ),
872- 'returns_space_list' : lambda : sass_types .SassList (
873- ('medium' , 'none' ), sass_types .SASS_SEPARATOR_SPACE ,
871+ 'returns_space_list' : lambda : sass .SassList (
872+ ('medium' , 'none' ), sass .SASS_SEPARATOR_SPACE ,
874873 ),
875874 'returns_py_dict' : lambda : {'foo' : 'bar' },
876- 'returns_map' : lambda : sass_types .SassMap ((('foo' , 'bar' ),)),
875+ 'returns_map' : lambda : sass .SassMap ((('foo' , 'bar' ),)),
877876 # TODO: returns SassMap
878877 'identity' : identity ,
879878}
0 commit comments