~ubuntu-branches/debian/experimental/pyflakes/experimental

« back to all changes in this revision

Viewing changes to pyflakes/test/test_script.py

  • Committer: Bazaar Package Importer
  • Author(s): Sandro Tosi, Tristan Seligmann, Sandro Tosi, Hervé Cauwelier
  • Date: 2008-09-21 00:17:47 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20080921001747-xal540q30vt2kzk6
Tags: 0.2.1+svn16699-1
[ Tristan Seligmann ]
* Remove redundant/broken python_unicode patch.
* Remove unneeded dependency on python-dev.

[ Sandro Tosi ]
* debian/control
  - changed my email address
  - bump Standards-Version to 3.8.0
    + added debian/README.source
* debian/rules
  - added get-orig-source
* debian/copyright
  - updated copyright information

[ Hervé Cauwelier ]
* Update to a recent SVN checkout; Closes: #499123
* Strip whitespace in debian/rules
* Refresh patches
* Fixed installation with debian/patches/install_scripts_package.diff

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
"""
 
3
Tests for L{pyflakes.scripts.pyflakes}.
 
4
"""
 
5
 
 
6
from twisted.python.filepath import FilePath
 
7
from twisted.trial.unittest import TestCase
 
8
 
 
9
from pyflakes.scripts.pyflakes import checkPath
 
10
 
 
11
class CheckTests(TestCase):
 
12
    """
 
13
    Tests for L{check} and L{checkPath} which check a file for flakes.
 
14
    """
 
15
    def test_missingTrailingNewline(self):
 
16
        """
 
17
        Source which doesn't end with a newline shouldn't cause any
 
18
        exception to be raised nor an error indicator to be returned by
 
19
        L{check}.
 
20
        """
 
21
        fName = self.mktemp()
 
22
        FilePath(fName).setContent("def foo():\n\tpass\n\t")
 
23
        self.assertFalse(checkPath(fName))