コード例 #1
0
ファイル: test_tokenizing.py プロジェクト: ysakthi/drocer
    def test_spaces(self):

        assert tokenize('foo bar') == ['foo', 'bar']
        assert tokenize('foo  bar') == ['foo', 'bar']
        assert tokenize('foo bar ') == ['foo', 'bar']
        assert tokenize(' foo bar') == ['foo', 'bar']
コード例 #2
0
ファイル: test_tokenizing.py プロジェクト: ysakthi/drocer
    def test_split_on_punc(self):

        assert tokenize('foo,bar') == ['foo,', 'bar']
コード例 #3
0
ファイル: test_tokenizing.py プロジェクト: calarrick/drocer
    def test_split_on_punc(self) :

        assert tokenize('foo,bar') == ['foo,', 'bar']
コード例 #4
0
ファイル: test_tokenizing.py プロジェクト: calarrick/drocer
    def test_spaces(self) :

        assert tokenize('foo bar') == ['foo', 'bar']
        assert tokenize('foo  bar') == ['foo', 'bar']
        assert tokenize('foo bar ') == ['foo', 'bar']
        assert tokenize(' foo bar') == ['foo', 'bar']
コード例 #5
0
from parser4 import tokenize
import unittest


if __name__ == '__main__' :
    example_input = "Ord. No. 19-15. By Council Members Pruitt and Kelley (by departmental request). an emergency ordinance authorizing the Director of Public Utilities to make alterations and modifications in Contract No. CT 2004 PI 2013-18 with Hooper Corporation for the Lake Road Improvement for Phase 3 of the Substation and Distribution Expansion Project, for the Department of Public Utilities. Whereas, this ordinance constitutes an emergency measure providing for the usual daily operation of a municipal department; now, therefore, Be it ordained by the Council of the City of Cleveland: Section 1. That the Director of Public Utilities is authorized to make the following alterations and modifications in Contract No. CT 2004 PI 2013-18 with Hooper Corporation for the Lake Road Improvement for Phase 3 of the Substation and Distribution Expansion Project, for the Department of Public Utilities: Subsidiary Additions: 1. Install cable, racking and splices on Marquette Avenue from MH Cable Poles near MH 124-57 on East 55th Street 2. Contingency amount Total Subsidiary Additions: Original Contract Amount Total Subsidiary Additions REVISED CONTRACT AMOUNT  $641,748.00 +158,252.00 $800,000.00  $ 11,948,801.98 + 800,000.00 $ 12,748,801.98  which alteration has been recommended in writing by the Director of Public Utilities, countersigned by the Mayor, and consented to by the surety on the contract, which price to be paid has been agreed upon in writing and signed by the Director of Public Utilities and the contractor. This alteration will cause an increase in the amount of the original contract in the sum of $800,000 to be paid from Fund No. 58 SF 230. Section 2. That this ordinance is declared to be an emergency measure and, provided it receives the affirmative vote of two-thirds of all the members elected to Council, it shall take effect and be in force immediately upon its passage and approval by the Mayor; otherwise it shall take effect and be in force from and after the earliest period allowed by law. Referred to Directors of Public Utilities, Finance, Law; Committees on Utilities, Finance.  4  January 7, 2015"    
    print "INPUT"
    print example_input
    print "OUTPUT"
    print tokenize(example_input)