summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_dataclasses.py
diff options
context:
space:
mode:
authorEric V. Smith <ericvsmith@users.noreply.github.com>2018-03-21 21:10:22 (GMT)
committerGitHub <noreply@github.com>2018-03-21 21:10:22 (GMT)
commit8e4560a9da6a02aa157dd7df8bd0be0d258c0a73 (patch)
tree0276b5db71dc9fe964b69024b05e66ced4c6e809 /Lib/test/test_dataclasses.py
parentdec1c7786f642049c2508e909442189dc043b5da (diff)
downloadcpython-8e4560a9da6a02aa157dd7df8bd0be0d258c0a73.zip
cpython-8e4560a9da6a02aa157dd7df8bd0be0d258c0a73.tar.gz
cpython-8e4560a9da6a02aa157dd7df8bd0be0d258c0a73.tar.bz2
Add 'Field' to dataclasses.__all__. (GH-6182)
- Add missing 'Field' to __all__. - Improve tests to catch this.
Diffstat (limited to 'Lib/test/test_dataclasses.py')
-rwxr-xr-xLib/test/test_dataclasses.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/Lib/test/test_dataclasses.py b/Lib/test/test_dataclasses.py
index 9b5aad2..69ace36 100755
--- a/Lib/test/test_dataclasses.py
+++ b/Lib/test/test_dataclasses.py
@@ -1,7 +1,8 @@
-from dataclasses import (
- dataclass, field, FrozenInstanceError, fields, asdict, astuple,
- make_dataclass, replace, InitVar, Field, MISSING, is_dataclass,
-)
+# Deliberately use "from dataclasses import *". Every name in __all__
+# is tested, so they all must be present. This is a way to catch
+# missing ones.
+
+from dataclasses import *
import pickle
import inspect