Commit 6510f357 authored by Samuel GAIST's avatar Samuel GAIST

[test] Moved all error related algorithms under their own user

This allows to have a cleaner content and a dedicated place for
error related tests.
parent 324af4bf
...@@ -6,14 +6,14 @@ repos: ...@@ -6,14 +6,14 @@ repos:
hooks: hooks:
- id: black - id: black
language_version: python3.6 language_version: python3.6
exclude: beat/core/test/prefix/algorithms/user/syntax_error/1.py|beat/core/test/prefix/databases/invalid/1.py exclude: beat/core/test/prefix/algorithms/errors/syntax_error/1.py|beat/core/test/prefix/databases/invalid/1.py
- repo: https://github.com/pre-commit/pre-commit-hooks - repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.0.0 rev: v2.0.0
hooks: hooks:
- id: trailing-whitespace - id: trailing-whitespace
- id: end-of-file-fixer - id: end-of-file-fixer
- id: debug-statements - id: debug-statements
exclude: beat/core/test/prefix/algorithms/user/syntax_error/1.py|beat/core/test/prefix/databases/invalid/1.py exclude: beat/core/test/prefix/algorithms/errors/syntax_error/1.py|beat/core/test/prefix/databases/invalid/1.py
- id: check-added-large-files - id: check-added-large-files
- id: check-docstring-first - id: check-docstring-first
- id: flake8 - id: flake8
...@@ -23,7 +23,7 @@ repos: ...@@ -23,7 +23,7 @@ repos:
rev: 'master' # Update me! rev: 'master' # Update me!
hooks: hooks:
- id: bandit - id: bandit
exclude: beat/editor/test|beat/core/test/prefix/algorithms/user/syntax_error/1.py|beat/core/test/prefix/databases/invalid/1.py exclude: beat/core/test/prefix/algorithms/errors/syntax_error/1.py|beat/core/test/prefix/databases/invalid/1.py
- repo: local - repo: local
hooks: hooks:
- id: sphinx-build - id: sphinx-build
......
...@@ -58,7 +58,7 @@ def test_load_default_algorithm(): ...@@ -58,7 +58,7 @@ def test_load_default_algorithm():
def test_missing_inputs(): def test_missing_inputs():
algorithm = Algorithm(prefix, "user/no_inputs_declarations/1") algorithm = Algorithm(prefix, "errors/no_inputs_declarations/1")
nose.tools.assert_false(algorithm.valid) nose.tools.assert_false(algorithm.valid)
nose.tools.assert_not_equal( nose.tools.assert_not_equal(
algorithm.errors[0].find("'inputs' is a required property"), -1 algorithm.errors[0].find("'inputs' is a required property"), -1
...@@ -70,7 +70,7 @@ def test_missing_inputs(): ...@@ -70,7 +70,7 @@ def test_missing_inputs():
def test_missing_outputs(): def test_missing_outputs():
algorithm = Algorithm(prefix, "user/no_outputs_declarations/1") algorithm = Algorithm(prefix, "errors/no_outputs_declarations/1")
nose.tools.assert_false(algorithm.valid) nose.tools.assert_false(algorithm.valid)
nose.tools.assert_not_equal( nose.tools.assert_not_equal(
algorithm.errors[0].find("'outputs' is a required property"), -1 algorithm.errors[0].find("'outputs' is a required property"), -1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment