diff options
-rw-r--r-- | .travis.yml | 5 | ||||
-rwxr-xr-x | bin/test | 4 | ||||
-rw-r--r-- | requirements.txt | 2 | ||||
-rw-r--r-- | screenplain/main.py | 1 | ||||
-rw-r--r-- | screenplain/richstring.py | 1 | ||||
-rw-r--r-- | tests/files_test.py | 3 |
6 files changed, 11 insertions, 5 deletions
diff --git a/.travis.yml b/.travis.yml index 2ece8ef..863e82a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,9 @@ language: python python: - "2.7" - - "3.3" + - "3.5" + - "3.6" + - "3.7" + - "3.8" install: pip install -r requirements.txt script: bin/test @@ -2,7 +2,7 @@ if [[ $(python -V 2>&1) =~ "Python 2" ]] then nosetests --nocapture --with-doctest --doctest-tests -I ^test.py $* && \ - pep8 --ignore=E402 screenplain tests + pycodestyle --ignore=E402,W504 screenplain tests else - python test.py && pep8 --ignore=E402 screenplain tests + python test.py && pycodestyle --ignore=E402,W504 screenplain tests fi diff --git a/requirements.txt b/requirements.txt index 50f908b..97231be 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ reportlab unittest2 nose -pep8 +pycodestyle six diff --git a/screenplain/main.py b/screenplain/main.py index 313498f..9f337f1 100644 --- a/screenplain/main.py +++ b/screenplain/main.py @@ -133,5 +133,6 @@ def main(args): if output_file: output.close() + if __name__ == '__main__': main(sys.argv[1:]) diff --git a/screenplain/richstring.py b/screenplain/richstring.py index 1859e12..2fafd9b 100644 --- a/screenplain/richstring.py +++ b/screenplain/richstring.py @@ -229,6 +229,7 @@ class _CreateStyledString(object): def __add__(self, other): return _CreateStyledString(self.styles.union(other.styles)) + plain = _CreateStyledString(()) bold = _CreateStyledString((Bold,)) italic = _CreateStyledString((Italic,)) diff --git a/tests/files_test.py b/tests/files_test.py index b5a390c..4254f55 100644 --- a/tests/files_test.py +++ b/tests/files_test.py @@ -15,7 +15,7 @@ from screenplain.main import main source_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), 'files')) -line_break_re = re.compile('\s*\n\s*') +line_break_re = re.compile('\\s*\n\\s*') spaces_re = re.compile('[ \t]+') @@ -115,4 +115,5 @@ def _create_tests(): ): FileTests.add_file_case(source, expected) + _create_tests() |