tests: Remove pure testing tests¶
Description¶
Abstract¶
Remove test_testing.* files.
Motivation¶
Now that we know that tests are working, we can remove the ones that purely existed to check if the CI did its job right.
Rationale¶
In the makefile, we ignore “error 5” from pytest, error simply meaning that there is no test to run.
Info¶
- Hash
3fcf835fa084ce949b1daad4290365f7b74c70e3
- Date
2019-06-03 15:50:46 +0200
- Parents
tests(bdd): Enbrace behavior driven development [c3d850c1] — 2019-06-03 13:55:01 +0200
- Children
Merge branch ‘feature/twidi/ci’ into develop [78fe33f3] — 2019-06-03 17:33:27 +0200
- Branches
- Tags
(No tags)
Changes¶
Makefile¶
- Type
Modified
- Stats
+2 -1
@@ -63,7 +63,8 @@ clean-doc: ## Clean the documentation directories
test: tests # we allow "test" and "tests"
tests: ## Run tests for the isshub project.
@echo "$(BOLD)Running tests$(RESET)"
- @pytest
+ @## we ignore error 5 from pytest meaning there is no test to run
+ @pytest || ( ERR=$$?; if [ $${ERR} -eq 5 ]; then (exit 0); else (exit $${ERR}); fi )
.PHONY: lint
lint: ## Run all linters (check-isort, check-black, mypy, flake8, pylint)
setup.cfg¶
- Type
Modified
- Stats
+0 -4
@@ -79,10 +79,6 @@ warn_incomplete_stub = true
[mypy-isshub.*.tests.*]
ignore_errors = True
-[mypy-test_testing]
-ignore_errors = True
-
-
[flake8]
ignore =
# Line too long: we let black manage it
test_testing.feature¶
- Type
Deleted
- Stats
+0 -5
@@ -1,5 +0,0 @@
-Feature: Testing bdd tests
-
- Scenario: A bdd test must pass
- Given a bdd test
- Then it must pass
test_testing.py¶
- Type
Deleted
- Stats
+0 -24
@@ -1,24 +0,0 @@
-"""Test file to check testing tools"""
-
-from pytest_bdd import given, parsers, scenario, then
-
-
-def test_passing():
- """A test that must pass"""
-
- assert 1 == 1
-
-
-@scenario("test_testing.feature", "A bdd test must pass")
-def test_bdd():
- pass
-
-
-@given("a bdd test")
-def a_bdd_test():
- return "a bdd test"
-
-
-@then("it must pass")
-def it_must_pass(a_bdd_test):
- assert a_bdd_test == "a bdd test"