def test__unittest__fail(self): self.write_config_files(tox_fail_config) result = unittest_main() for dirpath, dirs, files in os.walk('.tox'): for fname in files: if fname.endswith('.log'): filename = os.path.join(dirpath, fname) header(filename) with open(filename) as fh: print(fh.read() + os.linesep) self.assertNotEqual(result, 0)
def test__unittest__tox_args(self): os.environ['TOX_ARGS'] = '-v' self.write_config_files(working_config) result = unittest_main() for dirpath, dirs, files in os.walk('.tox'): for fname in files: if fname.endswith('.log'): filename = os.path.join(dirpath, fname) header(filename) with open(filename) as fh: print(fh.read() + os.linesep) self.assertEqual(result, 0)
def test__unittest__no_artifacts_dir(self): del os.environ['SD_ARTIFACTS_DIR'] self.write_config_files(working_config) result = unittest_main() for dirpath, dirs, files in os.walk('.tox'): for fname in files: if fname.endswith('.log'): filename = os.path.join(dirpath, fname) header(filename) with open(filename) as fh: print(fh.read() + os.linesep) self.assertEqual(result, 0)
def test__unittest__tox_envlist(self): os.environ[ 'TOX_ENVLIST'] = f'py{sys.version_info.major}{sys.version_info.minor}' self.write_config_files(working_config) result = unittest_main() for dirpath, dirs, files in os.walk('.tox'): for fname in files: if fname.endswith('.log'): filename = os.path.join(dirpath, fname) header(filename) with open(filename) as fh: print(fh.read() + os.linesep) self.assertEqual(result, 0)