summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_module/bad_getattr2.py
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2023-08-22 14:53:49 (GMT)
committerGitHub <noreply@github.com>2023-08-22 14:53:49 (GMT)
commitadfc118fdab66882599e01a84c22bd897055f3f1 (patch)
treef9802048fd55fb2864456ae5173b614229248816 /Lib/test/test_module/bad_getattr2.py
parente8ef0bdd8c613a722bf7965bf1da912882141a52 (diff)
downloadcpython-adfc118fdab66882599e01a84c22bd897055f3f1.zip
cpython-adfc118fdab66882599e01a84c22bd897055f3f1.tar.gz
cpython-adfc118fdab66882599e01a84c22bd897055f3f1.tar.bz2
gh-106016: Add Lib/test/test_module/ directory (#108293)
* Move Python scripts related to test_module to this new directory: good_getattr.py and bad_getattrX.py scripts. * Move Lib/test/test_module.py to Lib/test/test_module/__init__.py.
Diffstat (limited to 'Lib/test/test_module/bad_getattr2.py')
-rw-r--r--Lib/test/test_module/bad_getattr2.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_module/bad_getattr2.py b/Lib/test/test_module/bad_getattr2.py
new file mode 100644
index 0000000..0a52a53
--- /dev/null
+++ b/Lib/test/test_module/bad_getattr2.py
@@ -0,0 +1,7 @@
+def __getattr__():
+ "Bad one"
+
+x = 1
+
+def __dir__(bad_sig):
+ return []