[ 
https://issues.apache.org/jira/browse/BEAM-3713?focusedWorklogId=328007&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-328007
 ]

ASF GitHub Bot logged work on BEAM-3713:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 14/Oct/19 17:38
            Start Date: 14/Oct/19 17:38
    Worklog Time Spent: 10m 
      Work Description: chadrik commented on pull request #9756: [BEAM-3713] 
Add pytest for unit tests
URL: https://github.com/apache/beam/pull/9756#discussion_r334590246
 
 

 ##########
 File path: sdks/python/conftest.py
 ##########
 @@ -0,0 +1,29 @@
+#
+# 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.
+#
+"""Pytest configuration and custom hooks."""
+
+from __future__ import absolute_import
+
+import sys
+
+# See pytest.ini for main collection rules.
+collect_ignore_glob = []
+if sys.version_info < (3,):
+  collect_ignore_glob.append('*_py3.py')
+for minor in [5, 6, 7, 8, 9]:
+  if sys.version_info < (3, minor):
+    collect_ignore_glob.append('*_py3%d.py' % minor)
 
 Review comment:
   How about something like this:
   
   ```python
   MAX_SUPPORTED_PYTHON_VERSION = (3, 8)
   
   # See pytest.ini for main collection rules.
   collect_ignore_glob = []
   if sys.version_info < (3,):
     collect_ignore_glob.append('*_py3.py')
   else:
     for minor in range(sys.version_info.minor +1, 
MAX_SUPPORTED_PYTHON_VERSION[1] + 1):
       collect_ignore_glob.append('*_py3%d.py' % minor)
   ```
   
 
----------------------------------------------------------------
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:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 328007)
    Time Spent: 8h 40m  (was: 8.5h)

> Consider moving away from nose to nose2 or pytest.
> --------------------------------------------------
>
>                 Key: BEAM-3713
>                 URL: https://issues.apache.org/jira/browse/BEAM-3713
>             Project: Beam
>          Issue Type: Test
>          Components: sdk-py-core, testing
>            Reporter: Robert Bradshaw
>            Assignee: Udi Meiri
>            Priority: Minor
>          Time Spent: 8h 40m
>  Remaining Estimate: 0h
>
> Per 
> [https://nose.readthedocs.io/en/latest/|https://nose.readthedocs.io/en/latest/,]
>  , nose is in maintenance mode.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to