Skip to content

Commit

Permalink
Remove "run_common_tests()" in all tests.py to make it work with Pyth…
Browse files Browse the repository at this point in the history
…on 3
  • Loading branch information
henryken committed Jan 20, 2020
1 parent b318a12 commit 6768943
Show file tree
Hide file tree
Showing 28 changed files with 122 additions and 74 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from test_helper import run_common_tests, failed, passed, get_file_output
from test_helper import failed, passed, get_file_output, \
test_is_not_empty, test_answer_placeholders_text_deleted


def test_output():
Expand All @@ -29,5 +30,6 @@ def test_output():


if __name__ == '__main__':
run_common_tests()
test_is_not_empty()
test_answer_placeholders_text_deleted()
test_output()
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from test_helper import run_common_tests, failed, passed, get_file_output
from test_helper import failed, passed, get_file_output, \
test_is_not_empty, test_answer_placeholders_text_deleted


def test_output():
Expand All @@ -29,5 +30,6 @@ def test_output():


if __name__ == '__main__':
run_common_tests()
test_is_not_empty()
test_answer_placeholders_text_deleted()
test_output()
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from test_helper import run_common_tests, failed, passed, get_file_output
from test_helper import failed, passed, get_file_output, \
test_is_not_empty, test_answer_placeholders_text_deleted


def test_output():
Expand All @@ -29,5 +30,6 @@ def test_output():


if __name__ == '__main__':
run_common_tests()
test_is_not_empty()
test_answer_placeholders_text_deleted()
test_output()
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from test_helper import run_common_tests, failed, passed, get_file_output
from test_helper import failed, passed, get_file_output, \
test_answer_placeholders_text_deleted, test_is_not_empty


def test_output():
Expand All @@ -29,5 +30,6 @@ def test_output():


if __name__ == '__main__':
run_common_tests()
test_is_not_empty()
test_answer_placeholders_text_deleted()
test_output()
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from test_helper import run_common_tests, failed, passed, get_file_output
from test_helper import failed, passed, get_file_output, \
test_is_not_empty, test_answer_placeholders_text_deleted


def test_output():
Expand All @@ -29,5 +30,6 @@ def test_output():


if __name__ == '__main__':
run_common_tests()
test_is_not_empty()
test_answer_placeholders_text_deleted()
test_output()
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from test_helper import run_common_tests, failed, passed, get_answer_placeholders, get_file_output
from test_helper import failed, passed, \
get_answer_placeholders, get_file_output, test_is_not_empty, \
test_answer_placeholders_text_deleted


def test_filter():
Expand All @@ -39,6 +41,7 @@ def test_output():


if __name__ == '__main__':
run_common_tests()
test_is_not_empty()
test_answer_placeholders_text_deleted()
test_filter()
test_output()
6 changes: 4 additions & 2 deletions learning/katas/python/Common Transforms/Filter/ParDo/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from test_helper import run_common_tests, failed, passed, get_file_output
from test_helper import failed, passed, get_file_output, \
test_is_not_empty, test_answer_placeholders_text_deleted


def test_output():
Expand All @@ -29,5 +30,6 @@ def test_output():


if __name__ == '__main__':
run_common_tests()
test_is_not_empty()
test_answer_placeholders_text_deleted()
test_output()
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from test_helper import run_common_tests, failed, passed, get_file_output
from test_helper import failed, passed, get_file_output, \
test_is_not_empty, test_answer_placeholders_text_deleted


def test_output():
Expand All @@ -39,5 +40,6 @@ def test_output():


if __name__ == '__main__':
run_common_tests()
test_is_not_empty()
test_answer_placeholders_text_deleted()
test_output()
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from test_helper import run_common_tests, failed, passed, get_file_output
from test_helper import failed, passed, get_file_output, \
test_is_not_empty, test_answer_placeholders_text_deleted


def test_output():
Expand All @@ -33,5 +34,6 @@ def test_output():


if __name__ == '__main__':
run_common_tests()
test_is_not_empty()
test_answer_placeholders_text_deleted()
test_output()
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from test_helper import run_common_tests, failed, passed, get_answer_placeholders, get_file_output
from test_helper import failed, passed, \
get_answer_placeholders, get_file_output, test_is_not_empty, \
test_answer_placeholders_text_deleted


def test_combine_placeholders():
Expand All @@ -35,7 +37,7 @@ def test_output():
PLAYER_3 = 'Player 3'

answers = [str((PLAYER_1, 115)), str((PLAYER_2, 85)), str((PLAYER_3, 25))]
print answers
print(answers)

if all(num in output for num in answers):
passed()
Expand All @@ -44,6 +46,7 @@ def test_output():


if __name__ == '__main__':
run_common_tests()
test_is_not_empty()
test_answer_placeholders_text_deleted()
test_combine_placeholders()
test_output()
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from test_helper import run_common_tests, failed, passed, get_answer_placeholders, get_file_output
from test_helper import failed, passed, \
get_answer_placeholders, get_file_output, test_is_not_empty, \
test_answer_placeholders_text_deleted


def test_combine_placeholders():
Expand All @@ -39,6 +41,7 @@ def test_output():


if __name__ == '__main__':
run_common_tests()
test_is_not_empty()
test_answer_placeholders_text_deleted()
test_combine_placeholders()
test_output()
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from test_helper import run_common_tests, failed, passed, get_answer_placeholders, get_file_output
from test_helper import failed, passed, \
get_answer_placeholders, get_file_output, test_is_not_empty, \
test_answer_placeholders_text_deleted


def test_combine_placeholders():
Expand All @@ -39,6 +41,7 @@ def test_output():


if __name__ == '__main__':
run_common_tests()
test_is_not_empty()
test_answer_placeholders_text_deleted()
test_combine_placeholders()
test_output()
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from test_helper import run_common_tests, failed, passed, get_answer_placeholders, get_file_output
from test_helper import failed, passed, \
get_answer_placeholders, get_file_output, test_is_not_empty, \
test_answer_placeholders_text_deleted


def test_composite_expand_method():
Expand All @@ -39,6 +41,7 @@ def test_output():


if __name__ == '__main__':
run_common_tests()
test_is_not_empty()
test_answer_placeholders_text_deleted()
test_composite_expand_method()
test_output()
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from test_helper import run_common_tests, failed, passed, get_answer_placeholders, get_file_output
from test_helper import failed, passed, \
get_answer_placeholders, get_file_output, test_is_not_empty, \
test_answer_placeholders_text_deleted


def test_flatten():
Expand All @@ -39,6 +41,7 @@ def test_output():


if __name__ == '__main__':
run_common_tests()
test_is_not_empty()
test_answer_placeholders_text_deleted()
test_flatten()
test_output()
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from test_helper import run_common_tests, failed, passed, get_file_output
from test_helper import failed, passed, get_file_output, \
test_is_not_empty, test_answer_placeholders_text_deleted


def test_output():
Expand All @@ -31,5 +32,6 @@ def test_output():


if __name__ == '__main__':
run_common_tests()
test_is_not_empty()
test_answer_placeholders_text_deleted()
test_output()
7 changes: 5 additions & 2 deletions learning/katas/python/Core Transforms/Map/FlatMap/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from test_helper import run_common_tests, failed, passed, get_answer_placeholders, get_file_output
from test_helper import failed, passed, \
get_answer_placeholders, get_file_output, test_is_not_empty, \
test_answer_placeholders_text_deleted


def test_flatmap():
Expand All @@ -39,6 +41,7 @@ def test_output():


if __name__ == '__main__':
run_common_tests()
test_is_not_empty()
test_answer_placeholders_text_deleted()
test_flatmap()
test_output()
7 changes: 5 additions & 2 deletions learning/katas/python/Core Transforms/Map/Map/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from test_helper import run_common_tests, failed, passed, get_answer_placeholders, get_file_output
from test_helper import failed, passed, \
get_answer_placeholders, get_file_output, test_is_not_empty, \
test_answer_placeholders_text_deleted


def test_map():
Expand All @@ -39,6 +41,7 @@ def test_output():


if __name__ == '__main__':
run_common_tests()
test_is_not_empty()
test_answer_placeholders_text_deleted()
test_map()
test_output()
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from test_helper import run_common_tests, failed, passed, get_answer_placeholders, get_file_output
from test_helper import failed, passed, \
get_answer_placeholders, get_file_output, test_is_not_empty, \
test_answer_placeholders_text_deleted


def test_dofn_process_method():
Expand Down Expand Up @@ -49,7 +51,8 @@ def test_output():


if __name__ == '__main__':
run_common_tests()
test_is_not_empty()
test_answer_placeholders_text_deleted()
test_dofn_process_method()
test_pardo()
test_output()
7 changes: 5 additions & 2 deletions learning/katas/python/Core Transforms/Map/ParDo/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from test_helper import run_common_tests, failed, passed, get_answer_placeholders, get_file_output
from test_helper import failed, passed, \
get_answer_placeholders, get_file_output, test_is_not_empty, \
test_answer_placeholders_text_deleted


def test_dofn_process_method():
Expand Down Expand Up @@ -49,7 +51,8 @@ def test_output():


if __name__ == '__main__':
run_common_tests()
test_is_not_empty()
test_answer_placeholders_text_deleted()
test_dofn_process_method()
test_pardo()
test_output()
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from test_helper import run_common_tests, failed, passed, get_answer_placeholders, get_file_output
from test_helper import failed, passed, \
get_answer_placeholders, get_file_output, test_is_not_empty, \
test_answer_placeholders_text_deleted


def test_partition():
Expand Down Expand Up @@ -48,6 +50,7 @@ def test_output():


if __name__ == '__main__':
run_common_tests()
test_is_not_empty()
test_answer_placeholders_text_deleted()
test_partition()
test_output()
Loading

0 comments on commit 6768943

Please sign in to comment.