Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. Can I use QTest or Qt Quick test on PySide2 or PySide6

Can I use QTest or Qt Quick test on PySide2 or PySide6

Scheduled Pinned Locked Moved Unsolved Qt for Python
7 Posts 2 Posters 1.6k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • CKurduC Offline
    CKurduC Offline
    CKurdu
    wrote on last edited by CKurdu
    #1

    Hello, is it possible to use QTest or Qt Quick Test with PySide2 or PySide6?

    The documentation does not recommend using it for unit tests.
    https://doc.qt.io/qtforpython-6/PySide6/QtTest/index.html

    Is anyone using PySide2? Can you share an example URL?

    Which one is the more commonly used convention - pytest-qt or QtTest?

    I think using pytest-qt is common convention.

    Pytest is a testing framework that uses function-based tests, which helps minimize code usage and is practical. However, I tend to prefer Qt's solutions for testing.

    I am a bit confused because while the documentation recommends using pytest, I am not sure if I should go with pytest-qt.

    Additionally, I am curious if Qt-creator will support pytest in the future.

    You reap what you sow it

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      pytest-qt is a good option. It works pretty well so go with it.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      CKurduC 1 Reply Last reply
      1
      • SGaistS SGaist

        Hi,

        pytest-qt is a good option. It works pretty well so go with it.

        CKurduC Offline
        CKurduC Offline
        CKurdu
        wrote on last edited by CKurdu
        #3

        Thanks for your answer, @SGaist.
        I appreciate your insight.

        Do you know what Qt's future strategy is?

        Is there any plan to offer pytest support on the Qt Creator IDE?

        You reap what you sow it

        SGaistS 1 Reply Last reply
        0
        • CKurduC CKurdu

          Thanks for your answer, @SGaist.
          I appreciate your insight.

          Do you know what Qt's future strategy is?

          Is there any plan to offer pytest support on the Qt Creator IDE?

          SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          What strategy are you referring to ?

          What kind of support would you expect in Qt Creator ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          CKurduC 1 Reply Last reply
          0
          • SGaistS SGaist

            What strategy are you referring to ?

            What kind of support would you expect in Qt Creator ?

            CKurduC Offline
            CKurduC Offline
            CKurdu
            wrote on last edited by
            #5

            @SGaist
            To view test results, click Tools, then Tests, and select Run All Tests.

            To create a unit test, click New File and Test Case.

            It would be beneficial to have these types of features available for pytest.

            You reap what you sow it

            SGaistS 1 Reply Last reply
            0
            • CKurduC CKurdu

              @SGaist
              To view test results, click Tools, then Tests, and select Run All Tests.

              To create a unit test, click New File and Test Case.

              It would be beneficial to have these types of features available for pytest.

              SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @CKurdu that's the kind of things you should ask as features on the bug tracker.

              Note that pytest tests have nothing really special in their structure with regards to Python's official test module.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              CKurduC 1 Reply Last reply
              1
              • SGaistS SGaist

                @CKurdu that's the kind of things you should ask as features on the bug tracker.

                Note that pytest tests have nothing really special in their structure with regards to Python's official test module.

                CKurduC Offline
                CKurduC Offline
                CKurdu
                wrote on last edited by
                #7

                Thanks for the suggestion @SGaist, I'll definitely try it out.

                You reap what you sow it

                1 Reply Last reply
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved