Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfb529da

Browse files
committed
TST: Remove multiple nested imports.
1 parenteef6b12 commitfb529da

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

‎lib/matplotlib/testing/determinism.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
importio
66
importos
77
importre
8+
importsys
9+
fromsubprocessimportcheck_output
810

911
frommatplotlibimportpyplotasplt
1012

@@ -13,7 +15,6 @@ def _determinism_save(objects='mhi', format="pdf"):
1315
# save current value of SOURCE_DATE_EPOCH and set it
1416
# to a constant value, so that time difference is not
1517
# taken into account
16-
importsys
1718
sde=os.environ.pop('SOURCE_DATE_EPOCH',None)
1819
os.environ['SOURCE_DATE_EPOCH']="946684800"
1920

@@ -78,8 +79,6 @@ def _determinism_check(objects='mhi', format="pdf", uid=""):
7879
some string to add to the filename used to store the output. Use it to
7980
allow parallel execution of two tests with the same objects parameter.
8081
"""
81-
importsys
82-
fromsubprocessimportcheck_output
8382
fromnose.toolsimportassert_equal
8483
plots= []
8584
foriinrange(3):
@@ -112,8 +111,6 @@ def _determinism_source_date_epoch(format, string, keyword=b"CreationDate"):
112111
a string to look at when searching for the timestamp in the document
113112
(used in case the test fails).
114113
"""
115-
importsys
116-
fromsubprocessimportcheck_output
117114
buff=check_output([sys.executable,'-R','-c',
118115
'import matplotlib; '
119116
'matplotlib.use(%r); '

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp