<s> from __future__ import unicode_literals <EOL> from bs4 import BeautifulSoup <EOL> import os <EOL> from sorl . thumbnail import default <EOL> import unittest <EOL> from django . test import TestCase as DjangoTestCase <EOL> from inline_media . models import PictureSet <EOL> from inline_media . parser import inlines , render_inline <EOL> from inline_media . tests . test_models import ( create_picture_1 , <EOL> create_picture_2 , <EOL> create_picture_3 ) <EOL> def skipIfGetThumbnailFails ( f ) : <EOL> def func ( self ) : <EOL> curdir = os . path . dirname ( __file__ ) <EOL> filenames = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> try : <EOL> for filename in filenames : <EOL> filepath = os . path . join ( curdir , filename ) <EOL> f = open ( filepath , '<STR_LIT:r>' ) <EOL> default . backend . get_thumbnail ( f , '<STR_LIT>' ) <EOL> except Exception as exc : <EOL> raise unittest . SkipTest ( exc ) <EOL> return lambda f : f <EOL> return func <EOL> class PictureTemplateTestCase ( DjangoTestCase ) : <EOL> """<STR_LIT>""" <EOL> def setUp ( self ) : <EOL> self . picture = create_picture_1 ( ) <EOL> self . tag = ( '<STR_LIT>' <EOL> '<STR_LIT>' % self . picture . id + '<STR_LIT>' ) <EOL> def _reverse_default_boolean_field_values ( self ) : <EOL> self . picture . show_as_link = False <EOL> self . picture . show_description_inline = False <EOL> self . picture . show_author = True <EOL> self . picture . show_license = True <EOL> self . picture . save ( ) <EOL> def _inline_with_css_class ( self , css_class ) : <EOL> soup = BeautifulSoup ( self . tag % css_class , selfClosingTags = [ '<STR_LIT>' ] ) <EOL> result_dict = render_inline ( soup . find ( '<STR_LIT>' ) ) <EOL> return result_dict [ '<STR_LIT>' ] <EOL> @ skipIfGetThumbnailFails <EOL> def test_mini_with_default_options ( self ) : <EOL> tmpl = '<STR_LIT>' <EOL> positions = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> for cssclass in positions : <EOL> self . assert_ ( tmpl in self . _inline_with_css_class ( cssclass ) ) <EOL> html = inlines ( self . tag % cssclass , return_list = False ) <EOL> soup = BeautifulSoup ( html ) <EOL> links = soup . findAll ( '<STR_LIT:a>' , attrs = { '<STR_LIT:class>' : '<STR_LIT>' } ) <EOL> self . assert_ ( len ( links ) == <NUM_LIT:1> ) <EOL> self . assert_ ( html . find ( '<STR_LIT>' ) == - <NUM_LIT:1> ) <EOL> self . assert_ ( html . find ( '<STR_LIT>' ) == - <NUM_LIT:1> ) <EOL> self . assert_ ( html . find ( '<STR_LIT>' ) == - <NUM_LIT:1> ) <EOL> @ skipIfGetThumbnailFails <EOL> def test_small_with_default_options ( self ) : <EOL> tmpl = '<STR_LIT>' <EOL> positions = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> for cssclass in positions : <EOL> self . assert_ ( tmpl in self . _inline_with_css_class ( cssclass ) ) <EOL> html = inlines ( self . tag % cssclass , return_list = False ) <EOL> soup = BeautifulSoup ( html ) <EOL> links = soup . findAll ( '<STR_LIT:a>' , attrs = { '<STR_LIT:class>' : '<STR_LIT>' } ) <EOL> self . assert_ ( len ( links ) == <NUM_LIT:1> ) <EOL> descrip = soup . findAll ( '<STR_LIT>' , <EOL> attrs = { '<STR_LIT:class>' : '<STR_LIT>' } ) <EOL> self . assert_ ( len ( descrip ) == <NUM_LIT:1> ) <EOL> self . assert_ ( html . find ( '<STR_LIT>' ) == - <NUM_LIT:1> ) <EOL> self . assert_ ( html . find ( '<STR_LIT>' ) == - <NUM_LIT:1> ) <EOL> @ skipIfGetThumbnailFails <EOL> def test_medium_with_default_options ( self ) : <EOL> tmpl = '<STR_LIT>' <EOL> positions = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> for cssclass in positions : <EOL> self . assert_ ( tmpl in self . _inline_with_css_class ( cssclass ) ) <EOL> html = inlines ( self . tag % cssclass , return_list = False ) <EOL> soup = BeautifulSoup ( html ) <EOL> links = soup . findAll ( '<STR_LIT:a>' , attrs = { '<STR_LIT:class>' : '<STR_LIT>' } ) <EOL> self . assert_ ( len ( links ) == <NUM_LIT:1> ) <EOL> descrip = soup . findAll ( '<STR_LIT>' , <EOL> attrs = { '<STR_LIT:class>' : '<STR_LIT>' } ) <EOL> self . assert_ ( len ( descrip ) == <NUM_LIT:1> ) <EOL> self . assert_ ( html . find ( '<STR_LIT>' ) == - <NUM_LIT:1> ) <EOL> self . assert_ ( html . find ( '<STR_LIT>' ) == - <NUM_LIT:1> ) <EOL> @ skipIfGetThumbnailFails <EOL> def test_large_with_default_options ( self ) : <EOL> tmpl = '<STR_LIT>' <EOL> positions = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> for cssclass in positions : <EOL> self . assert_ ( tmpl in self . _inline_with_css_class ( cssclass ) ) <EOL> html = inlines ( self . tag % cssclass , return_list = False ) <EOL> soup = BeautifulSoup ( html ) <EOL> links = soup . findAll ( '<STR_LIT:a>' , attrs = { '<STR_LIT:class>' : '<STR_LIT>' } ) <EOL> self . assert_ ( len ( links ) == <NUM_LIT:1> ) <EOL> descrip = soup . findAll ( '<STR_LIT>' , <EOL> attrs = { '<STR_LIT:class>' : '<STR_LIT>' } ) <EOL> self . assert_ ( len ( descrip ) == <NUM_LIT:1> ) <EOL> self . assert_ ( html . find ( '<STR_LIT>' ) == - <NUM_LIT:1> ) <EOL> self . assert_ ( html . find ( '<STR_LIT>' ) == - <NUM_LIT:1> ) <EOL> @ skipIfGetThumbnailFails <EOL> def test_full_with_default_options ( self ) : <EOL> tmpl = '<STR_LIT>' <EOL> positions = [ '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' ] <EOL> for cssclass in positions : <EOL> self . assert_ ( tmpl in self . _inline_with_css_class ( cssclass ) ) <EOL> html = inlines ( self . tag % cssclass , return_list = False ) <EOL> soup = BeautifulSoup ( html ) <EOL> links = soup . findAll ( '<STR_LIT:a>' , attrs = { '<STR_LIT:class>' : '<STR_LIT>' } ) <EOL> self . assert_ ( len ( links ) == <NUM_LIT:0> ) <EOL> descrip = soup . findAll ( '<STR_LIT>' , <EOL> attrs = { '<STR_LIT:class>' : '<STR_LIT>' } ) <EOL> self . assert_ ( len ( descrip ) == <NUM_LIT:1> ) <EOL> self . assert_ ( html . find ( '<STR_LIT>' ) == - <NUM_LIT:1> ) <EOL> self . assert_ ( html . find ( '<STR_LIT>' ) == - <NUM_LIT:1> ) <EOL> @ skipIfGetThumbnailFails <EOL> def test_mini_with_reversed_default_options ( self ) : <EOL> tmpl = '<STR_LIT>' <EOL> positions = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> self . _reverse_default_boolean_field_values ( ) <EOL> for cssclass in positions : <EOL> self . assert_ ( tmpl in self . _inline_with_css_class ( cssclass ) ) <EOL> html = inlines ( self . tag % cssclass , return_list = False ) <EOL> soup = BeautifulSoup ( html ) <EOL> links = soup . findAll ( '<STR_LIT:a>' , attrs = { '<STR_LIT:class>' : '<STR_LIT>' } ) <EOL> self . assert_ ( len ( links ) == <NUM_LIT:0> ) <EOL> self . assert_ ( html . find ( '<STR_LIT>' ) == - <NUM_LIT:1> ) <EOL> self . assert_ ( html . find ( '<STR_LIT>' ) == - <NUM_LIT:1> ) <EOL> self . assert_ ( html . find ( '<STR_LIT>' ) == - <NUM_LIT:1> ) <EOL> @ skipIfGetThumbnailFails <EOL> def test_small_with_reversed_default_options ( self ) : <EOL> tmpl = '<STR_LIT>' <EOL> positions = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> self . _reverse_default_boolean_field_values ( ) <EOL> for cssclass in positions : <EOL> self . assert_ ( tmpl in self . _inline_with_css_class ( cssclass ) ) <EOL> html = inlines ( self . tag % cssclass , return_list = False ) <EOL> soup = BeautifulSoup ( html ) <EOL> links = soup . findAll ( '<STR_LIT:a>' , attrs = { '<STR_LIT:class>' : '<STR_LIT>' } ) <EOL> self . assert_ ( len ( links ) == <NUM_LIT:0> ) <EOL> self . assert_ ( html . find ( '<STR_LIT>' ) == - <NUM_LIT:1> ) <EOL> author = soup . findAll ( '<STR_LIT>' , attrs = { '<STR_LIT:class>' : '<STR_LIT>' } ) <EOL> self . assert_ ( len ( author ) == <NUM_LIT:1> ) <EOL> license = soup . findAll ( '<STR_LIT>' , attrs = { '<STR_LIT:class>' : '<STR_LIT>' } ) <EOL> self . assert_ ( len ( license ) == <NUM_LIT:1> ) <EOL> @ skipIfGetThumbnailFails <EOL> def test_medium_with_reversed_default_options ( self ) : <EOL> tmpl = '<STR_LIT>' <EOL> positions = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> self . _reverse_default_boolean_field_values ( ) <EOL> for cssclass in positions : <EOL> self . assert_ ( tmpl in self . _inline_with_css_class ( cssclass ) ) <EOL> html = inlines ( self . tag % cssclass , return_list = False ) <EOL> soup = BeautifulSoup ( html ) <EOL> links = soup . findAll ( '<STR_LIT:a>' , attrs = { '<STR_LIT:class>' : '<STR_LIT>' } ) <EOL> self . assert_ ( len ( links ) == <NUM_LIT:0> ) <EOL> self . assert_ ( html . find ( '<STR_LIT>' ) == - <NUM_LIT:1> ) <EOL> author = soup . findAll ( '<STR_LIT>' , attrs = { '<STR_LIT:class>' : '<STR_LIT>' } ) <EOL> self . assert_ ( len ( author ) == <NUM_LIT:1> ) <EOL> license = soup . findAll ( '<STR_LIT>' , attrs = { '<STR_LIT:class>' : '<STR_LIT>' } ) <EOL> self . assert_ ( len ( license ) == <NUM_LIT:1> ) <EOL> @ skipIfGetThumbnailFails <EOL> def test_large_with_reversed_default_options ( self ) : <EOL> tmpl = '<STR_LIT>' <EOL> positions = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> self . _reverse_default_boolean_field_values ( ) <EOL> for cssclass in positions : <EOL> self . assert_ ( tmpl in self . _inline_with_css_class ( cssclass ) ) <EOL> html = inlines ( self . tag % cssclass , return_list = False ) <EOL> soup = BeautifulSoup ( html ) <EOL> links = soup . findAll ( '<STR_LIT:a>' , attrs = { '<STR_LIT:class>' : '<STR_LIT>' } ) <EOL> self . assert_ ( len ( links ) == <NUM_LIT:0> ) <EOL> self . assert_ ( html . find ( '<STR_LIT>' ) == - <NUM_LIT:1> ) <EOL> author = soup . findAll ( '<STR_LIT>' , attrs = { '<STR_LIT:class>' : '<STR_LIT>' } ) <EOL> self . assert_ ( len ( author ) == <NUM_LIT:1> ) <EOL> license = soup . findAll ( '<STR_LIT>' , attrs = { '<STR_LIT:class>' : '<STR_LIT>' } ) <EOL> self . assert_ ( len ( license ) == <NUM_LIT:1> ) <EOL> @ skipIfGetThumbnailFails <EOL> def test_full_with_reversed_default_options ( self ) : <EOL> tmpl = '<STR_LIT>' <EOL> positions = [ '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' ] <EOL> self . _reverse_default_boolean_field_values ( ) <EOL> for cssclass in positions : <EOL> self . assert_ ( tmpl in self . _inline_with_css_class ( cssclass ) ) <EOL> html = inlines ( self . tag % cssclass , return_list = False ) <EOL> soup = BeautifulSoup ( html ) <EOL> links = soup . findAll ( '<STR_LIT:a>' , attrs = { '<STR_LIT:class>' : '<STR_LIT>' } ) <EOL> self . assert_ ( len ( links ) == <NUM_LIT:0> ) <EOL> self . assert_ ( html . find ( '<STR_LIT>' ) == - <NUM_LIT:1> ) <EOL> author = soup . findAll ( '<STR_LIT>' , attrs = { '<STR_LIT:class>' : '<STR_LIT>' } ) <EOL> self . assert_ ( len ( author ) == <NUM_LIT:1> ) <EOL> license = soup . findAll ( '<STR_LIT>' , attrs = { '<STR_LIT:class>' : '<STR_LIT>' } ) <EOL> self . assert_ ( len ( license ) == <NUM_LIT:1> ) <EOL> class PictureSetTemplateTestCase ( DjangoTestCase ) : <EOL> """<STR_LIT>""" <EOL> def setUp ( self ) : <EOL> self . pics = create_picture_1 ( ) , create_picture_2 ( ) , create_picture_3 ( ) <EOL> self . picset = PictureSet . objects . create ( <EOL> title = "<STR_LIT>" , slug = "<STR_LIT>" , order = "<STR_LIT>" ) <EOL> self . picset . pictures . add ( self . pics [ <NUM_LIT:0> ] ) <EOL> self . picset . pictures . add ( self . pics [ <NUM_LIT:1> ] ) <EOL> self . picset . pictures . add ( self . pics [ <NUM_LIT:2> ] ) <EOL> self . tag = ( '<STR_LIT>' <EOL> '<STR_LIT>' % self . picset . id + '<STR_LIT>' ) <EOL> def _reverse_default_boolean_field_values ( self ) : <EOL> self . picset . show_description_inline = False <EOL> self . picset . show_counter = True <EOL> self . picset . save ( ) <EOL> def _inline_with_css_class ( self , css_class ) : <EOL> soup = BeautifulSoup ( self . tag % css_class , selfClosingTags = [ '<STR_LIT>' ] ) <EOL> result_dict = render_inline ( soup . find ( '<STR_LIT>' ) ) <EOL> return result_dict [ '<STR_LIT>' ] <EOL> @ skipIfGetThumbnailFails <EOL> def test_mini_with_default_options ( self ) : <EOL> positions = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> for cssclass in positions : <EOL> with self . assertRaises ( Exception ) : <EOL> inlines ( self . tag % cssclass , return_list = False ) <EOL> @ skipIfGetThumbnailFails <EOL> def test_small_with_default_options ( self ) : <EOL> positions = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> for cssclass in positions : <EOL> with self . assertRaises ( Exception ) : <EOL> inlines ( self . tag % cssclass , return_list = False ) <EOL> @ skipIfGetThumbnailFails <EOL> def test_medium_with_default_options ( self ) : <EOL> tmpl = '<STR_LIT>' <EOL> positions = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> for cssclass in positions : <EOL> self . assert_ ( tmpl in self . _inline_with_css_class ( cssclass ) ) <EOL> html = inlines ( self . tag % cssclass , return_list = False ) <EOL> soup = BeautifulSoup ( html ) <EOL> links = soup . findAll ( '<STR_LIT:a>' ) <EOL> self . assert_ ( len ( links ) == <NUM_LIT:3> ) <EOL> order = [ int ( x ) - <NUM_LIT:1> for x in self . picset . order . split ( "<STR_LIT:U+002C>" ) ] <EOL> for idx , link in zip ( order , links ) : <EOL> self . assert_ ( link [ '<STR_LIT>' ] == self . pics [ idx ] . url ) <EOL> descrip = soup . findAll ( '<STR_LIT>' , <EOL> attrs = { '<STR_LIT:class>' : '<STR_LIT>' } ) <EOL> self . assert_ ( len ( descrip ) == <NUM_LIT:1> ) <EOL> self . assert_ ( html . find ( '<STR_LIT>' ) == - <NUM_LIT:1> ) <EOL> @ skipIfGetThumbnailFails <EOL> def test_large_with_default_options ( self ) : <EOL> tmpl = '<STR_LIT>' <EOL> positions = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> for cssclass in positions : <EOL> self . assert_ ( tmpl in self . _inline_with_css_class ( cssclass ) ) <EOL> html = inlines ( self . tag % cssclass , return_list = False ) <EOL> soup = BeautifulSoup ( html ) <EOL> links = soup . findAll ( '<STR_LIT:a>' ) <EOL> self . assert_ ( len ( links ) == <NUM_LIT:3> ) <EOL> order = [ int ( x ) - <NUM_LIT:1> for x in self . picset . order . split ( "<STR_LIT:U+002C>" ) ] <EOL> for idx , link in zip ( order , links ) : <EOL> self . assert_ ( link [ '<STR_LIT>' ] == self . pics [ idx ] . url ) <EOL> descrip = soup . findAll ( '<STR_LIT>' , <EOL> attrs = { '<STR_LIT:class>' : '<STR_LIT>' } ) <EOL> self . assert_ ( len ( descrip ) == <NUM_LIT:1> ) <EOL> self . assert_ ( html . find ( '<STR_LIT>' ) == - <NUM_LIT:1> ) <EOL> @ skipIfGetThumbnailFails <EOL> def test_full_with_default_options ( self ) : <EOL> tmpl = '<STR_LIT>' <EOL> positions = [ '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' ] <EOL> for cssclass in positions : <EOL> self . assert_ ( tmpl in self . _inline_with_css_class ( cssclass ) ) <EOL> html = inlines ( self . tag % cssclass , return_list = False ) <EOL> soup = BeautifulSoup ( html ) <EOL> links = soup . findAll ( '<STR_LIT:a>' ) <EOL> self . assertEqual ( len ( links ) , <NUM_LIT:3> ) <EOL> order = [ int ( x ) - <NUM_LIT:1> for x in self . picset . order . split ( "<STR_LIT:U+002C>" ) ] <EOL> for idx , link in zip ( order , links ) : <EOL> self . assert_ ( link [ '<STR_LIT>' ] == self . pics [ idx ] . url ) <EOL> descrip = soup . findAll ( '<STR_LIT>' , <EOL> attrs = { '<STR_LIT:class>' : '<STR_LIT>' } ) <EOL> self . assert_ ( len ( descrip ) == <NUM_LIT:1> ) <EOL> self . assert_ ( html . find ( '<STR_LIT>' ) == - <NUM_LIT:1> ) <EOL> @ skipIfGetThumbnailFails <EOL> def test_mini_with_reversed_default_options ( self ) : <EOL> positions = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> self . _reverse_default_boolean_field_values ( ) <EOL> for cssclass in positions : <EOL> with self . assertRaises ( Exception ) : <EOL> inlines ( self . tag % cssclass , return_list = False ) <EOL> @ skipIfGetThumbnailFails <EOL> def test_small_with_reversed_default_options ( self ) : <EOL> positions = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> self . _reverse_default_boolean_field_values ( ) <EOL> for cssclass in positions : <EOL> with self . assertRaises ( Exception ) : <EOL> inlines ( self . tag % cssclass , return_list = False ) <EOL> @ skipIfGetThumbnailFails <EOL> def test_medium_with_reversed_default_options ( self ) : <EOL> tmpl = '<STR_LIT>' <EOL> positions = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> self . _reverse_default_boolean_field_values ( ) <EOL> for cssclass in positions : <EOL> self . assert_ ( tmpl in self . _inline_with_css_class ( cssclass ) ) <EOL> html = inlines ( self . tag % cssclass , return_list = False ) <EOL> soup = BeautifulSoup ( html ) <EOL> links = soup . findAll ( '<STR_LIT:a>' ) <EOL> self . assert_ ( len ( links ) == <NUM_LIT:3> ) <EOL> order = [ int ( x ) - <NUM_LIT:1> for x in self . picset . order . split ( "<STR_LIT:U+002C>" ) ] <EOL> for idx , link in zip ( order , links ) : <EOL> self . assert_ ( link [ '<STR_LIT>' ] == self . pics [ idx ] . url ) <EOL> self . assert_ ( html . find ( '<STR_LIT>' ) == - <NUM_LIT:1> ) <EOL> counter = soup . findAll ( '<STR_LIT>' , attrs = { '<STR_LIT:class>' : '<STR_LIT>' } ) <EOL> self . assert_ ( len ( counter ) == <NUM_LIT:1> ) <EOL> @ skipIfGetThumbnailFails <EOL> def test_large_with_reversed_default_options ( self ) : <EOL> tmpl = '<STR_LIT>' <EOL> positions = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> self . _reverse_default_boolean_field_values ( ) <EOL> for cssclass in positions : <EOL> self . assert_ ( tmpl in self . _inline_with_css_class ( cssclass ) ) <EOL> html = inlines ( self . tag % cssclass , return_list = False ) <EOL> soup = BeautifulSoup ( html ) <EOL> links = soup . findAll ( '<STR_LIT:a>' ) <EOL> self . assert_ ( len ( links ) == <NUM_LIT:3> ) <EOL> order = [ int ( x ) - <NUM_LIT:1> for x in self . picset . order . split ( "<STR_LIT:U+002C>" ) ] <EOL> for idx , link in zip ( order , links ) : <EOL> self . assert_ ( link [ '<STR_LIT>' ] == self . pics [ idx ] . url ) <EOL> self . assert_ ( html . find ( '<STR_LIT>' ) == - <NUM_LIT:1> ) <EOL> counter = soup . findAll ( '<STR_LIT>' , attrs = { '<STR_LIT:class>' : '<STR_LIT>' } ) <EOL> self . assert_ ( len ( counter ) == <NUM_LIT:1> ) <EOL> @ skipIfGetThumbnailFails <EOL> def test_full_with_reversed_default_options ( self ) : <EOL> tmpl = '<STR_LIT>' <EOL> positions = [ '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' ] <EOL> self . _reverse_default_boolean_field_values ( ) <EOL> for cssclass in positions : <EOL> self . assert_ ( tmpl in self . _inline_with_css_class ( cssclass ) ) <EOL> html = inlines ( self . tag % cssclass , return_list = False ) <EOL> soup = BeautifulSoup ( html ) <EOL> links = soup . findAll ( '<STR_LIT:a>' ) <EOL> self . assert_ ( len ( links ) == <NUM_LIT:3> ) <EOL> order = [ int ( x ) - <NUM_LIT:1> for x in self . picset . order . split ( "<STR_LIT:U+002C>" ) ] <EOL> for idx , link in zip ( order , links ) : <EOL> self . assert_ ( link [ '<STR_LIT>' ] == self . pics [ idx ] . url ) <EOL> self . assert_ ( html . find ( '<STR_LIT>' ) == - <NUM_LIT:1> ) <EOL> counter = soup . findAll ( '<STR_LIT>' , attrs = { '<STR_LIT:class>' : '<STR_LIT>' } ) <EOL> self . assert_ ( len ( counter ) == <NUM_LIT:1> ) </s>
