Beispiel #1
0
 def test_can_access_project_variables(self):
     variables_test_code_content = common.content_of(common_testing.get_test_resources_path("scratch_code_only", "variables_test.json"))
     raw_project = scratch.RawProject.from_project_code_content(variables_test_code_content)
     assert [variable["name"] for variable in raw_project.get_variables()] == ["$", "MarketOpen", "Multiplier", "bc1bought", "bc2bought"]
Beispiel #2
0
 def test_can_access_project_variables(self):
     variables_test_code_content = common.content_of(common_testing.get_test_resources_path("scratch_code_only", "variables_test.json"))
     raw_project = scratch.RawProject.from_project_code_content(variables_test_code_content)
     assert [variable["name"] for variable in raw_project.get_variables()] == ["$", "MarketOpen", "Multiplier", "bc1bought", "bc2bought"]
Beispiel #3
0
 def test_can_create_from_raw_content(self):
     for project_name in self.TEST_PROJECTS:
         project_data_path = os.path.join(common_testing.get_test_project_path(project_name), scratch._PROJECT_FILE_NAME)
         assert scratch.RawProject.from_project_code_content(common.content_of(project_data_path))
Beispiel #4
0
 def test_can_create_from_raw_content(self):
     for project_name in self.TEST_PROJECTS:
         project_data_path = os.path.join(common_testing.get_test_project_path(project_name), scratch._PROJECT_FILE_NAME)
         assert scratch.RawProject.from_project_code_content(common.content_of(project_data_path))