Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
green_mode.py: Run BEAR_DEPS bears while testing
This patch makes the bears from BEAR_DEPS run and test for green output before running the actual independent bear. Some test bears are also added and tests are added for the changes.
- Loading branch information
Showing
6 changed files
with
108 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
from coalib.bears.LocalBear import LocalBear | ||
from tests.test_bears.AnotherTestLocalIndepBear import AnotherTestLocalIndepBear | ||
|
||
|
||
class AnotherTestLocalDepBear(LocalBear): | ||
CAN_FIX = {} | ||
LANGUAGES = {} | ||
BEAR_DEPS = {AnotherTestLocalIndepBear} | ||
|
||
def run(self, filename, file, yield_results=False): | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from coalib.bears.LocalBear import LocalBear | ||
|
||
|
||
class AnotherTestLocalIndepBear(LocalBear): | ||
CAN_FIX = {} | ||
LANGUAGES = {} | ||
|
||
def run(self, filename, file, x=2): | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from coalib.bears.LocalBear import LocalBear | ||
from tests.test_bears.TestLocalIndepBear import TestLocalIndepBear | ||
|
||
|
||
class TestLocalDepBear(LocalBear): | ||
CAN_FIX = {} | ||
LANGUAGES = {} | ||
BEAR_DEPS = {TestLocalIndepBear} | ||
|
||
def run(self, filename, file, yield_results=False): | ||
if yield_results: | ||
yield 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from coalib.bears.LocalBear import LocalBear | ||
|
||
|
||
class TestLocalIndepBear(LocalBear): | ||
CAN_FIX = {} | ||
LANGUAGES = {} | ||
|
||
def run(self, filename, file, x=2): | ||
yield 1 |