You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Chad Dombrova (Jira)" <ji...@apache.org> on 2019/09/13 16:48:00 UTC
[jira] [Commented] (BEAM-8229) Python postcommit 2.7 tests are
failing since we try to run a test with Python 3.6+ syntax on Python 2.
[ https://issues.apache.org/jira/browse/BEAM-8229?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16929360#comment-16929360 ]
Chad Dombrova commented on BEAM-8229:
-------------------------------------
Back with more insight.
The integration tests don't go through tox, which means logic regarding viritualenv setup and test exclusion is spread around the project a bit. Outside of tox.ini test exclusion is performed in build.gradle, run_integration_tests.sh, run_validatescontainer.sh.
Currently it looks like the integration tests don't run the python3-specific tests at all:
Here's run_integration_tests.sh:
{code:java}
python setup.py nosetests \
--test-pipeline-options="$PIPELINE_OPTS" \
--with-xunitmp --xunitmp-file=$XUNIT_FILE \
--ignore-files '.*py3.py$' \
$TEST_OPTS
{code}
Since this is already a bit of a sub-par situation (not running the py3-specific tests), I think the most reasonable solution is to extend this regex to py3[0-9]*, which will exclude my py37 tests as well. (Also, note that since this is a regex and not a glob, the period should have been escaped: as it is it means "any character").
I think the ideal long term solution is to make all tests pass through tox, which will increase their discoverability, runability, and standardization.
> Python postcommit 2.7 tests are failing since we try to run a test with Python 3.6+ syntax on Python 2.
> -------------------------------------------------------------------------------------------------------
>
> Key: BEAM-8229
> URL: https://issues.apache.org/jira/browse/BEAM-8229
> Project: Beam
> Issue Type: Bug
> Components: sdk-py-core
> Reporter: Ahmet Altay
> Assignee: Udi Meiri
> Priority: Blocker
>
> Root cause: https://github.com/apache/beam/pull/9098
> 20:12:14 Traceback (most recent call last):
> 20:12:14 File "/home/jenkins/jenkins-slave/workspace/beam_PostCommit_Python2_PR/src/build/gradleenv/-194514014/local/lib/python2.7/site-packages/nose/loader.py", line 418, in loadTestsFromName
> 20:12:14 addr.filename, addr.module)
> 20:12:14 File "/home/jenkins/jenkins-slave/workspace/beam_PostCommit_Python2_PR/src/build/gradleenv/-194514014/local/lib/python2.7/site-packages/nose/importer.py", line 47, in importFromPath
> 20:12:14 return self.importFromDir(dir_path, fqname)
> 20:12:14 File "/home/jenkins/jenkins-slave/workspace/beam_PostCommit_Python2_PR/src/build/gradleenv/-194514014/local/lib/python2.7/site-packages/nose/importer.py", line 94, in importFromDir
> 20:12:14 mod = load_module(part_fqname, fh, filename, desc)
> 20:12:14 SyntaxError: invalid syntax (external_test_py37.py, line 46)
--
This message was sent by Atlassian Jira
(v8.3.2#803003)