<s> import itertools <EOL> from tests import BaseTestCase <EOL> from nose_parameterized import parameterized , param <EOL> from dateparser . utils import find_date_separator <EOL> class TestUtils ( BaseTestCase ) : <EOL> def setUp ( self ) : <EOL> super ( TestUtils , self ) . setUp ( ) <EOL> self . date_format = None <EOL> self . result = None <EOL> def given_date_format ( self , date_format ) : <EOL> self . date_format = date_format <EOL> def when_date_seperator_is_parsed ( self ) : <EOL> self . result = find_date_separator ( self . date_format ) <EOL> def then_date_seperator_is ( self , sep ) : <EOL> self . assertEqual ( self . result , sep ) <EOL> @ parameterized . expand ( [ <EOL> param ( date_format = fmt . format ( sep = sep ) , expected_sep = sep ) <EOL> for ( fmt , sep ) in itertools . product ( <EOL> [ '<STR_LIT>' , '<STR_LIT>' ] , <EOL> [ '<STR_LIT:/>' , '<STR_LIT:.>' , '<STR_LIT:->' , '<STR_LIT::>' ] ) <EOL> ] ) <EOL> def test_separator_extraction ( self , date_format , expected_sep ) : <EOL> self . given_date_format ( date_format ) <EOL> self . when_date_seperator_is_parsed ( ) <EOL> self . then_date_seperator_is ( expected_sep ) </s>
