MCPcopy Create free account
hub / github.com/bleachbit/bleachbit / setUpClass

Method setUpClass

tests/common.py:62–76  ·  view source on GitHub ↗

Do common setup for the test case * Create a temporary directory for the testcase. * Treat warnings as errors. This is also set by environment variable in `Makefile` and `appveyor.yml`. * Patch options paths.

(cls)

Source from the content-addressed store, hash-verified

60
61 @classmethod
62 def setUpClass(cls):
63 """Do common setup for the test case
64
65 * Create a temporary directory for the testcase.
66 * Treat warnings as errors.
67 This is also set by environment variable in `Makefile` and
68 `appveyor.yml`.
69 * Patch options paths.
70 """
71 warnings.simplefilter("error")
72 cls.tempdir = tempfile.mkdtemp(prefix=cls.__name__)
73 if 'BLEACHBIT_TEST_OPTIONS_DIR' not in os.environ:
74 cls._patch_options_paths()
75 bleachbit.Options.options.reset_overrides()
76 bleachbit.Options.options.set_override("first_start", False)
77
78 @classmethod
79 def _patch_options_paths(cls):

Callers

nothing calls this directly

Calls 4

mkdtempMethod · 0.80
_patch_options_pathsMethod · 0.80
reset_overridesMethod · 0.80
set_overrideMethod · 0.80

Tested by

no test coverage detected