Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

STCC-181 reimplement failing tests in test converter #125

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/default.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: Scratch2Catrobat Converter
short_name: S2CC
version: 0.10.0
build_name: Aegean cat
build_number: 985
build_number: 989

;-------------------------------------------------------------------------------
[CATROBAT]
Expand Down
24 changes: 10 additions & 14 deletions src/scratchtocatrobat/converter/test_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -2578,18 +2578,14 @@ def test_key_pressed_script(self):


class TestConvertProjects(common_testing.ProjectTestCase):
def _load_test_scratch_project(self, project_name):
if os.path.splitext(project_name)[1]:
tempdir = common.TemporaryDirectory()
scratch_project_dir = tempdir.name
self.addCleanup(tempdir.cleanup)
common.extract(common_testing.get_test_project_packed_file(project_name),
scratch_project_dir)
else:
scratch_project_dir = common_testing.get_test_project_path(project_name)
def _load_test_scratch_project(self, project_name, force_download=False):
if (not force_download and os.path.exists("test/res/scratch/"+project_name)):
is_local_project = True

scratch_project_dir = common_testing.get_test_project_path(project_name)

scratch_project = scratch.Project(scratch_project_dir, name=project_name,
project_id=common_testing.PROJECT_DUMMY_ID)
project_id=common_testing.PROJECT_DUMMY_ID, is_local_project=is_local_project)
return scratch_project

def _test_project(self, project_name):
Expand Down Expand Up @@ -2628,16 +2624,16 @@ def test_can_convert_visible_variables(self):
assert found_show_var

# full_test_no_var
#def test_can_convert_project_without_variables(self):
# self._test_project("full_test_no_var")
def test_can_convert_project_without_variables(self):
self._test_project("full_test_no_var")

# keys_pressed
def test_can_convert_project_with_keys(self):
for project_name in ("keys_pressed", ):
self._test_project(project_name)

#def test_can_convert_project_with_mediafiles(self):
# self._test_project("Hannah_Montana")
def test_can_convert_project_with_mediafiles(self):
self._test_project("Hannah_Montana")

# simple test project
def test_can_convert_project_with_unusued_files(self):
Expand Down