Tests: Reorganize common and global tests

pull/4/head
Adrien Vergé 9 years ago
parent dd163ed551
commit 6b5948c06b

@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
from tests.rules.common import RuleTestCase from tests.common import RuleTestCase
class ColonTestCase(RuleTestCase): class ColonTestCase(RuleTestCase):

@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
from tests.rules.common import RuleTestCase from tests.common import RuleTestCase
class ColonTestCase(RuleTestCase): class ColonTestCase(RuleTestCase):

@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
from tests.rules.common import RuleTestCase from tests.common import RuleTestCase
class ColonTestCase(RuleTestCase): class ColonTestCase(RuleTestCase):

@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
from tests.rules.common import RuleTestCase from tests.common import RuleTestCase
class CommaTestCase(RuleTestCase): class CommaTestCase(RuleTestCase):

@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
from tests.rules.common import RuleTestCase from tests.common import RuleTestCase
class CommentsTestCase(RuleTestCase): class CommentsTestCase(RuleTestCase):

@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
from tests.rules.common import RuleTestCase from tests.common import RuleTestCase
class CommentsIndentationTestCase(RuleTestCase): class CommentsIndentationTestCase(RuleTestCase):

@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
from tests.rules.common import RuleTestCase from tests.common import RuleTestCase
class DocumentEndTestCase(RuleTestCase): class DocumentEndTestCase(RuleTestCase):

@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
from tests.rules.common import RuleTestCase from tests.common import RuleTestCase
class DocumentStartTestCase(RuleTestCase): class DocumentStartTestCase(RuleTestCase):

@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
from tests.rules.common import RuleTestCase from tests.common import RuleTestCase
class EmptyLinesTestCase(RuleTestCase): class EmptyLinesTestCase(RuleTestCase):

@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
from tests.rules.common import RuleTestCase from tests.common import RuleTestCase
class HyphenTestCase(RuleTestCase): class HyphenTestCase(RuleTestCase):

@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
from tests.rules.common import RuleTestCase from tests.common import RuleTestCase
class IndentationTestCase(RuleTestCase): class IndentationTestCase(RuleTestCase):

@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
from tests.rules.common import RuleTestCase from tests.common import RuleTestCase
class LineLengthTestCase(RuleTestCase): class LineLengthTestCase(RuleTestCase):

@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
from tests.rules.common import RuleTestCase from tests.common import RuleTestCase
class NewLineAtEndOfFileTestCase(RuleTestCase): class NewLineAtEndOfFileTestCase(RuleTestCase):

@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
from tests.rules.common import RuleTestCase from tests.common import RuleTestCase
class NewLinesTestCase(RuleTestCase): class NewLinesTestCase(RuleTestCase):

@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
from tests.rules.common import RuleTestCase from tests.common import RuleTestCase
class TrailingSpacesTestCase(RuleTestCase): class TrailingSpacesTestCase(RuleTestCase):

@ -14,13 +14,13 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
from tests.rules.common import RuleTestCase from tests.common import RuleTestCase
class YamlLintTestCase(RuleTestCase): class YamlLintTestCase(RuleTestCase):
rule_id = None # syntax error rule_id = None # syntax error
def test_lint(self): def test_syntax_errors(self):
self.check('---\n' self.check('---\n'
'this is not: valid: YAML\n', None, problem=(2, 19)) 'this is not: valid: YAML\n', None, problem=(2, 19))
self.check('---\n' self.check('---\n'
@ -29,8 +29,6 @@ class YamlLintTestCase(RuleTestCase):
'this is an error: [\n' 'this is an error: [\n'
'\n' '\n'
'...\n', None, problem=(6, 1)) '...\n', None, problem=(6, 1))
def test_directives(self):
self.check('%YAML 1.2\n' self.check('%YAML 1.2\n'
'%TAG ! tag:clarkevans.com,2002:\n' '%TAG ! tag:clarkevans.com,2002:\n'
'doc: ument\n' 'doc: ument\n'
Loading…
Cancel
Save