Skip to content

Commit f0c2761

Browse files
author
Takashi Matsuo
committed
removed debug print, display details of ImportError
1 parent 46dadd3 commit f0c2761

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

noxfile-template.py

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,11 @@
1616

1717
import os
1818
from pathlib import Path
19-
# Good old print debug
20-
import pprint
2119
import sys
2220

2321
import nox
2422

23+
2524
# WARNING - WARNING - WARNING - WARNING - WARNING
2625
# WARNING - WARNING - WARNING - WARNING - WARNING
2726
# DO NOT EDIT THIS FILE EVER!
@@ -60,25 +59,18 @@
6059
'envs': {},
6160
}
6261

63-
pp = pprint.PrettyPrinter(indent=4)
6462

6563
try:
64+
# Ensure we can import noxfile_config in the project's directory.
6665
sys.path.append('.')
67-
print("sys.path")
68-
pp.pprint(sys.path)
6966
from noxfile_config import TEST_CONFIG_OVERRIDE
70-
import noxfile_config
71-
print('noxfile_config.__file__')
72-
print(noxfile_config.__file__)
73-
except ImportError:
74-
print('importing noxfile_config failed')
67+
except ImportError as e:
68+
print("No user noxfile_config found: detail: {}".format(e))
7569
TEST_CONFIG_OVERRIDE = {}
7670

7771
# Update the TEST_CONFIG with the user supplied values.
7872
TEST_CONFIG.update(TEST_CONFIG_OVERRIDE)
7973

80-
print("TEST_CONFIG:")
81-
pp.pprint(TEST_CONFIG)
8274

8375
def get_pytest_env_vars():
8476
"""Returns a dict for pytest invocation."""
@@ -92,8 +84,6 @@ def get_pytest_env_vars():
9284

9385
# Apply user supplied envs.
9486
ret.update(TEST_CONFIG['envs'])
95-
print("pytest_env_vars:")
96-
pp.pprint(ret)
9787
return ret
9888

9989

0 commit comments

Comments
 (0)