RunestoneInteractive / RunestoneInteractive/thinkcspy

PythonTutor / CodeLens does not allow "import test"

Open
#279 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
135
Forks
197
PR merge metrics
No merged PRs in 30d

Description

This is the same as https://github.com/RunestoneInteractive/rs/issues/1146 ; I'm not sure where this report belongs.

What Page were you on

https://runestone.academy/ns/books/published/thinkcspy/Functions/ProgramDevelopment.html

Describe the bug

The code there includes "import test" -- but the current version of PythonTutor it uses does not allow that import, so you can't use it / CodeLens.

A Screenshot is worth a thousand words

Image

What is your username

github: dandrake
runestone: ddrake1

I have some sample code that uses unittest: https://github.com/RunestoneInteractive/rs/issues/1146#issuecomment-3888123181

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the CodeLens/PythonTutor integration used by the page at Functions/ProgramDevelopment.html and compare this report with rs issue 1146, including its unittest example. Determine where the import restriction is configured and verify that the page's import test example can run in CodeLens; the related issue may identify the active location for the fix.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.