Skip to end of metadata
Go to start of metadata

This page is the accessibility test plan for Python Download Package.

After download and install Python 3.9, besides Python language, the package installs two helper tools on the computer:

  1. IDLE, a Python’s Integrated Development and Learning Environment
  2. Python Launcher, an application to run python scripts

Below is test plan for testing accessibility of using Python with these tools.

Test Plan for IDLE

The test plan covers two parts:

  1. Python has a list of reserved keywords. Most keywords are regular words but there are a few that are abnormal. One part of the test plan is to make sure these abnormal keywords are communicated to AT users in an understandable way.
  2. The other part of the test plan is to make sure special characters used in scripts such as punctuations and symbols are are communicated to AT users in an understandable way.
  3. Screenreader: check accuracy of speech, check navigation options, are additional character files required to be installed to reader

Steps to test reserved keywords "def" and "nonlocal"

1. Launch IDLE, which brings up a command line interface;

2. Input the lines from Code Block A into the interface while using your AT, then hit enter twice until you see or hear the prompt sign ">>>";

Code Block A
def myfunc1():
  x = "John"
  def myfunc2():
    nonlocal x
    x = "hello"
  myfunc2()
  return x

3. Continue to input the line from Code Block B into the interface while using your AT, then hit enter twice;

Code Block B
print(myfunc1())

4. IDLE should print out this line shown in Code Block C:

Code Block C
hello

5. Input the line from Code Block D into the interface while using your AT, then hit enter;

Code Block D
print(myfunc2())

6. The error below should be output in red as shown in Code Block E:

Code Block E
Traceback (most recent call last):
  File "<pyshell#47>", line 1, in <module>
    print(func1())
NameError: name 'func2' is not defined

This whole process should be communicated to IDLE users via AT.

Repeat steps above by copying and pasting the code into the interface.

Steps to test reserved keywords "elif"

"elif" stands for "else if". This test is to ensure this special word can be communicated to AT users.

1. Launch IDLE, which brings up a command line interface;

2. Input the line from Code Block F into the interface while using your AT, then hit enter;

Code Block F
hello_world = True

3. Continue to input the lines from Code Block G below into the interface while using your AT, then hit enter twice until you see the prompt sign ">>>";

Code Block G
if (hello_world):
  print("hi, world")
elif (hello_world == "True"):
  print("true")
else:
  print("false")

4. IDLE should print out this line shown in Code Block H:

Code Block H
hi, world

This whole process should be communicated to IDLE users via AT.

Repeat steps above by copying and pasting the code into the interface.

Steps to test the communication of special characters

Writing scripts often involve the use of special characters such as ~ ! @ # etc. This test is to ensure these special chars can be entered and communicated to AT users properly.

1. Launch IDLE, which brings up a command line interface;

2. Input the line from Code Block I into the interface while using your AT, then hit enter;

Code Block I
z="<world> = great!"

3. Continue to input the line from Code Block J into the interface while using your AT, then hit enter;

Code Block J
removeSpecialChars = z.translate ({ord(c): " " for c in "!@#$%^&*()[]{};:,./<>?\|`~-=_+"})

4. Continue to input the line from Code Block K into the interface while using your AT, then hit enter;

Code Block K
print(removeSpecialChars)

5. IDLE should print out this line shown in Code Block L:

Code Block L
 world    great 

This whole process should be communicated to IDLE users via AT such as screen readers or dictators.

Note there are empty spaces in front of and at the end of the output line, which should be communicated too.

Repeat steps above by copying and pasting the code into the interface.

Test plan for Python Launcher

1. Open a text editor;

2. Copy and paste the script in Code Block M into the editor;

Code Block M
hello_world = True
if (hello_world) :
  print("hi, hello world")
elif (hello_world == "True") :
  print("true, hello world")
else :
  print("false, hello world")

3. Save the script as a file with a file extension ".py", for example in a file name of "test.py";

4. Launch Python Launcher;

5. In Python Launcher file menu, go to File → Open;

6. Select the file you just saved;

7. If Python Launcher asks for permission to run terminal, choose "yes";

8. Python Launcher opens a terminal, runs the script and print the output below in the terminal as shown in Code Block N:

Code Block N
Last login: Fri Mar  5 12:49:38 on ttys001
cd '/Users/cindyli/Development/' && '/usr/local/bin/python3'  '/Users/cindyli/Development/test.py'  && echo Exit status: $? && exit 1

The default interactive shell is now zsh.
To update your account to use zsh, please run `chsh -s /bin/zsh`.
For more details, please visit https://support.apple.com/kb/HT208050.
cindyli@Cindys-MacBook-Pro-3.local:~$ cd '/Users/cindyli/Development/' && '/usr/local/bin/python3'  '/Users/cindyli/Development/test.py'  && echo Exit status: $? && exit 1
hi, hello world
Exit status: 0
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.

[Process completed]

This whole process should be communicated to IDLE users via AT.

  • No labels