You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by GitBox <gi...@apache.org> on 2022/02/12 02:07:00 UTC

[GitHub] [cassandra] bschoening opened a new pull request #1445: Upgrade from nose, which is no longer maintained, to pytest

bschoening opened a new pull request #1445:
URL: https://github.com/apache/cassandra/pull/1445


   This is a minimalist upgrade to use the pytest framework.  It uses backward compatibility with nose to maintain nose imports.
   
   Several tests had to be updated or fixed, which seemed unrelated to the pytest upgrade.  With these changes, pytest runs a clean set of tests.
   
   % pytest
   ========================================================================== test session starts ===========================================================================
   platform darwin -- Python 3.9.10, pytest-7.0.0, pluggy-1.0.0
   rootdir: /Users/brad/mysto/cassandra/pylib
   plugins: anyio-2.1.0
   collected 87 items                                                                                                                                                       
   
   cqlshlib/test/test_constants.py .                                                                                                                                  [  1%]
   cqlshlib/test/test_copyutil.py .                                                                                                                                   [  2%]
   cqlshlib/test/test_cql_parsing.py .......................                                                                                                          [ 28%]
   cqlshlib/test/test_cqlsh_completion.py ..................                                                                                                          [ 49%]
   cqlshlib/test/test_cqlsh_output.py ...................................                                                                                             [ 89%]
   cqlshlib/test/test_sslhandling.py .....                                                                                                                            [ 95%]
   cqlshlib/test/test_unicode.py ....                                                                                                                                 [100%]
   
   ============================================================== 87 passed, 15 warnings in 319.37s (0:05:19) ===============================================================
   
   
   


-- 
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.

To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


[GitHub] [cassandra] bschoening commented on a change in pull request #1445: Upgrade from nose, which is no longer maintained, to pytest

Posted by GitBox <gi...@apache.org>.
bschoening commented on a change in pull request #1445:
URL: https://github.com/apache/cassandra/pull/1445#discussion_r809199005



##########
File path: pylib/cassandra-cqlsh-tests.sh
##########
@@ -126,14 +118,14 @@ ccm start --wait-for-binary-proto
 cd ${CASSANDRA_DIR}/pylib/cqlshlib/
 
 set +e # disable immediate exit from this point
-nosetests
+pytest
 RETURN="$?"
 
 ccm remove
 # hack around --xunit-prefix-with-testsuite-name not being available in nose 1.3.7
-sed -i "s/testsuite name=\"nosetests\"/testsuite name=\"${TESTSUITE_NAME}\"/g" nosetests.xml
-sed -i "s/testcase classname=\"cqlshlib./testcase classname=\"${TESTSUITE_NAME}./g" nosetests.xml
-mv nosetests.xml ${WORKSPACE}/cqlshlib.xml
+# sed -i "s/testsuite name=\"nosetests\"/testsuite name=\"${TESTSUITE_NAME}\"/g" nosetests.xml

Review comment:
       Yes, I will do that.  




-- 
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.

To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


[GitHub] [cassandra] bschoening commented on a change in pull request #1445: Upgrade from nose, which is no longer maintained, to pytest

Posted by GitBox <gi...@apache.org>.
bschoening commented on a change in pull request #1445:
URL: https://github.com/apache/cassandra/pull/1445#discussion_r810024608



##########
File path: pylib/cassandra-cqlsh-tests.sh
##########
@@ -126,14 +118,14 @@ ccm start --wait-for-binary-proto
 cd ${CASSANDRA_DIR}/pylib/cqlshlib/
 
 set +e # disable immediate exit from this point
-nosetests
+pytest
 RETURN="$?"
 
 ccm remove
 # hack around --xunit-prefix-with-testsuite-name not being available in nose 1.3.7
-sed -i "s/testsuite name=\"nosetests\"/testsuite name=\"${TESTSUITE_NAME}\"/g" nosetests.xml
-sed -i "s/testcase classname=\"cqlshlib./testcase classname=\"${TESTSUITE_NAME}./g" nosetests.xml
-mv nosetests.xml ${WORKSPACE}/cqlshlib.xml
+# sed -i "s/testsuite name=\"nosetests\"/testsuite name=\"${TESTSUITE_NAME}\"/g" nosetests.xml

Review comment:
       @bereng this has been updated




-- 
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.

To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


[GitHub] [cassandra] smiklosovic closed pull request #1445: Upgrade from nose, which is no longer maintained, to pytest

Posted by GitBox <gi...@apache.org>.
smiklosovic closed pull request #1445:
URL: https://github.com/apache/cassandra/pull/1445


   


-- 
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.

To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


[GitHub] [cassandra] bschoening commented on pull request #1445: Upgrade from nose, which is no longer maintained, to pytest

Posted by GitBox <gi...@apache.org>.
bschoening commented on pull request #1445:
URL: https://github.com/apache/cassandra/pull/1445#issuecomment-1037239807


   I need to fix the hard coded credentials in PlainTextAuthProvider(username='cassandra', password='cassandra')


-- 
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.

To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


[GitHub] [cassandra] bschoening commented on pull request #1445: Upgrade from nose, which is no longer maintained, to pytest

Posted by GitBox <gi...@apache.org>.
bschoening commented on pull request #1445:
URL: https://github.com/apache/cassandra/pull/1445#issuecomment-1037239807


   I need to fix the hard coded credentials in PlainTextAuthProvider(username='cassandra', password='cassandra')


-- 
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.

To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


[GitHub] [cassandra] bereng commented on a change in pull request #1445: Upgrade from nose, which is no longer maintained, to pytest

Posted by GitBox <gi...@apache.org>.
bereng commented on a change in pull request #1445:
URL: https://github.com/apache/cassandra/pull/1445#discussion_r808700721



##########
File path: pylib/cassandra-cqlsh-tests.sh
##########
@@ -126,14 +118,14 @@ ccm start --wait-for-binary-proto
 cd ${CASSANDRA_DIR}/pylib/cqlshlib/
 
 set +e # disable immediate exit from this point
-nosetests
+pytest
 RETURN="$?"
 
 ccm remove
 # hack around --xunit-prefix-with-testsuite-name not being available in nose 1.3.7
-sed -i "s/testsuite name=\"nosetests\"/testsuite name=\"${TESTSUITE_NAME}\"/g" nosetests.xml
-sed -i "s/testcase classname=\"cqlshlib./testcase classname=\"${TESTSUITE_NAME}./g" nosetests.xml
-mv nosetests.xml ${WORKSPACE}/cqlshlib.xml
+# sed -i "s/testsuite name=\"nosetests\"/testsuite name=\"${TESTSUITE_NAME}\"/g" nosetests.xml

Review comment:
       Why not simply remove these lines?




-- 
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.

To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


[GitHub] [cassandra] smiklosovic commented on pull request #1445: Upgrade from nose, which is no longer maintained, to pytest

Posted by GitBox <gi...@apache.org>.
smiklosovic commented on pull request #1445:
URL: https://github.com/apache/cassandra/pull/1445#issuecomment-1046276796


   https://github.com/apache/cassandra/commit/db3583318258b14b27abe1529f8893da2ff22bf5


-- 
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.

To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


[GitHub] [cassandra] bereng commented on a change in pull request #1445: Upgrade from nose, which is no longer maintained, to pytest

Posted by GitBox <gi...@apache.org>.
bereng commented on a change in pull request #1445:
URL: https://github.com/apache/cassandra/pull/1445#discussion_r812583283



##########
File path: pylib/cassandra-cqlsh-tests.sh
##########
@@ -126,14 +118,14 @@ ccm start --wait-for-binary-proto
 cd ${CASSANDRA_DIR}/pylib/cqlshlib/
 
 set +e # disable immediate exit from this point
-nosetests
+pytest
 RETURN="$?"
 
 ccm remove
 # hack around --xunit-prefix-with-testsuite-name not being available in nose 1.3.7
-sed -i "s/testsuite name=\"nosetests\"/testsuite name=\"${TESTSUITE_NAME}\"/g" nosetests.xml
-sed -i "s/testcase classname=\"cqlshlib./testcase classname=\"${TESTSUITE_NAME}./g" nosetests.xml
-mv nosetests.xml ${WORKSPACE}/cqlshlib.xml
+# sed -i "s/testsuite name=\"nosetests\"/testsuite name=\"${TESTSUITE_NAME}\"/g" nosetests.xml

Review comment:
       Thx!




-- 
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.

To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org