From commits-return-77457-archive-asf-public=cust-asf.ponee.io@airflow.apache.org Tue Nov 26 09:55:09 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 03D7618065D for ; Tue, 26 Nov 2019 10:55:08 +0100 (CET) Received: (qmail 8942 invoked by uid 500); 26 Nov 2019 09:55:08 -0000 Mailing-List: contact commits-help@airflow.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@airflow.apache.org Delivered-To: mailing list commits@airflow.apache.org Received: (qmail 8932 invoked by uid 99); 26 Nov 2019 09:55:08 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Nov 2019 09:55:08 +0000 From: GitBox To: commits@airflow.apache.org Subject: [GitHub] [airflow] nuclearpinguin commented on a change in pull request #6472: [AIRFLOW-6058] Running tests with pytest Message-ID: <157476210812.4720.11618487568616422573.gitbox@gitbox.apache.org> Date: Tue, 26 Nov 2019 09:55:08 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit nuclearpinguin commented on a change in pull request #6472: [AIRFLOW-6058] Running tests with pytest URL: https://github.com/apache/airflow/pull/6472#discussion_r350638827 ########## File path: tests/conftest.py ########## @@ -0,0 +1,47 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +import os +from copy import deepcopy + +import pytest + +from airflow.utils import db + + +@pytest.fixture(autouse=True) +def reset_environment(): + """ + Resets env variables. + """ + init_env = deepcopy(os.environ) Review comment: I checked all those occurrences and fixed `test_hive_hook` in other places it's used in helper or handled properly. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org With regards, Apache Git Services