Skip to content

Commit

Permalink
Write py5 python blob logic (#414)
Browse files Browse the repository at this point in the history
closes #390

---------

Co-authored-by: loiswells97 <loiswells97@users.noreply.github.com>
Co-authored-by: Lois Wells <lois.wells@raspberrypi.org>
Co-authored-by: Lois Wells <88904316+loiswells97@users.noreply.github.com>
Co-authored-by: Patrick Cherry <patch0@users.noreply.github.com>
  • Loading branch information
5 people committed Mar 27, 2023
1 parent 022023f commit 96e03d7
Show file tree
Hide file tree
Showing 12 changed files with 289 additions and 148 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

- Load project based on locale (#410)
- Ability to recognise py5 magic comment (#412)
- Python blob and skulpt module for py5 imported mode (#414)

### Changed

Expand Down
8 changes: 8 additions & 0 deletions cypress/e2e/spec.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,11 @@ it("runs with the magic comment present", () => {

cy.get(".pythonrunner-console-output-line").should("contain", "hello world")
})

it("runs basic skecth with py5 magic comment present", () => {
cy.visit(baseUrl)
cy.get("div[class=cm-content]").invoke('text', '# Py5: imported mode\ndef setup():\n\tsize(400,400)\n\ndef draw():\n\tprint("hello world")\nrun_sketch()')
cy.get(".btn--run").click()

cy.get(".pythonrunner-console-output-line").should("contain", "hello world")
})
1 change: 0 additions & 1 deletion public/py5_imported_mode.py

This file was deleted.

Loading

0 comments on commit 96e03d7

Please sign in to comment.