From 2054a203c9511f5cf7e6ddfb4bd3602f4b84f098 Mon Sep 17 00:00:00 2001 From: Thor77 Date: Fri, 4 Sep 2015 23:20:35 +0200 Subject: [PATCH] sort imports --- tests/test_config.py | 4 +++- tests/test_general.py | 4 +++- tests/test_style.py | 3 ++- tests/test_template.py | 6 ++++-- tsstats.py | 27 ++++++++++++++------------- 5 files changed, 26 insertions(+), 18 deletions(-) diff --git a/tests/test_config.py b/tests/test_config.py index 3e8ced5..2eec1a0 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -1,9 +1,11 @@ import configparser from os import remove from os.path import exists -from tsstats import parse_config, exceptions, gen_abspath + from nose.tools import raises, with_setup +from tsstats import exceptions, gen_abspath, parse_config + configpath = gen_abspath('tests/res/test.cfg') diff --git a/tests/test_general.py b/tests/test_general.py index 1b2aca0..6b76df6 100644 --- a/tests/test_general.py +++ b/tests/test_general.py @@ -1,7 +1,9 @@ -from tsstats import parse_logs, main, exceptions from os import remove + from nose.tools import raises +from tsstats import exceptions, main, parse_logs + clients = parse_logs('tests/res/test.log') diff --git a/tests/test_style.py b/tests/test_style.py index badeaaa..f456aa7 100644 --- a/tests/test_style.py +++ b/tests/test_style.py @@ -1,6 +1,7 @@ +from glob import glob + import pep8 from pyflakes.api import checkPath -from glob import glob def test_pep8_comformance(): diff --git a/tests/test_template.py b/tests/test_template.py index 35510ad..87d294a 100644 --- a/tests/test_template.py +++ b/tests/test_template.py @@ -1,7 +1,9 @@ -from bs4 import BeautifulSoup -from tsstats import parse_logs, render_template, _format_seconds from os import remove +from bs4 import BeautifulSoup + +from tsstats import _format_seconds, parse_logs, render_template + output_path = 'tests/res/output.html' clients = parse_logs('tests/res/test.log') diff --git a/tsstats.py b/tsstats.py index 7cbef66..87adf6d 100755 --- a/tsstats.py +++ b/tsstats.py @@ -1,16 +1,17 @@ -import re -import glob -import json -import logging -import argparse -import datetime -from os import sep -import configparser -from time import strftime, localtime -from os.path import exists -from jinja2 import Environment, FileSystemLoader - - +import argparse +import configparser +import datetime +import glob +import json +import logging +import re +from os import sep +from os.path import exists +from time import localtime, strftime + +from jinja2 import Environment, FileSystemLoader + + class Exceptions: class ConfigNotFound(Exception): pass