ModuleNotFoundError: No module named 'tests.test_helpers' on running tests/run.py
Ralf Habacker
ralf.habacker at freenet.de
Fri Jul 16 01:01:44 BST 2021
Am 14.07.21 um 15:13 schrieb Da Viper via Kde-finance-apps:
> Hello there module import problem has been fixed.
>
> You could check it.
>
Yes, got more success now, but see the log
----->-----------
ralf at xxx:~/src/gdb_printers> ./run.py
[RUN][INFO]: Building CMakeLists file
Installing in /usr/local. Run
/home/ralf/src/gdb_printers/tests/cpp_src_test/cmake_build/prefix.sh to
set the environment for testQstring.
-- Configuring done
-- Generating done
-- Build files have been written to:
/home/ralf/src/gdb_printers/tests/cpp_src_test/cmake_build
[ 25%] Automatic MOC and UIC for target test_bin
[ 25%] Built target test_bin_autogen
[100%] Built target test_bin
[RUN][INFO]: Adding Printers Directory to the PYTHONPATH environment
variable
[INFO][PYTHON ENV PATH]
:/home/ralf/src/gdb_printers/printers:/home/ralf/src/gdb_printers/tests
[RUN][INFO]: Starting GDB ...
*** GDB version: 10.1
*** Python version: 3.6.12 (default, Dec 02 2020, 09:44:23) [GCC]
[QT_PRINTERS][INFO]: Registering QT Printers ***
[QT_PRINTERS][INFO]: Running unit tests
QCharPrinterTest::test_initialized_with_no_variables ... ok
QCharPrinterTest::test_initialized_with_variables ... ok
QStringPrinterTest::test_initialized_with_no_variables ... ok
QStringPrinterTest::test_initialized_with_variables ... ok
QStringPrinterTest::test_not_initialized ... ok
QUrlPrinterTest::test_initialized_with_no_variables ... ok
QUrlPrinterTest::test_initialized_with_variables ... FAIL
======================================================================
FAIL: QUrlPrinterTest::test_initialized_with_variables
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/ralf/src/gdb_printers/tests/test_qtprinters.py", line 88,
in test_initialized_with_variables
check_equals(self, 'file', "file:qml/main.qml", self.display_hint,
None)
File "/home/ralf/src/gdb_printers/tests/test_qtprinters.py", line 40,
in check_equals
obj.assertEqual(org_string, string)
AssertionError: 'qml/main.qml' != 'file:qml/main.qml'
- qml/main.qml
+ file:qml/main.qml
? +++++
----------------------------------------------------------------------
Ran 7 tests in 4.346s
FAILED (failures=1)
[QT_PRINTERS][INFO]: Finished test
--------<---------------
In case gdb needs the python commands mentioned in the readme, you may
place them in a file in your git repo and use gdb -ix
<local-gdbinit-file> command line option to point to that file, which
make your script independent from the global .gdbinit file.
Regards
Ralf
> On Wed, 14 Jul 2021, 13:31 Da Viper, <yerimyah1 at gmail.com
> <mailto:yerimyah1 at gmail.com>> wrote:
>
> My bad I jest realized with was only running with preset
> environment variables
>
> Would fix it now
>
> On Wed, 14 Jul 2021, 12:16 Da Viper, <yerimyah1 at gmail.com
> <mailto:yerimyah1 at gmail.com>> wrote:
>
> Hello could you check if the repo is up to date from git ?
>
> I ran it in cloned from gitlab it ran ok
>
> Thanks
>
> On Wed, 14 Jul 2021, 07:04 Ralf Habacker via Kde-finance-apps,
> <kde-finance-apps at kde.org <mailto:kde-finance-apps at kde.org>>
> wrote:
>
> Hi Ebuka,
> I checkout latest code from you gdb_printer repo, did run
> and got an
> error as shown below:
>
> $:~/src/gdb_printers> tests/run.py
> [RUN][INFO]: Building CMakeLists file
> -- Configuring done
> -- Generating done
> -- Build files have been written to:
> /home/xxx/src/gdb_printers/tests/cpp_src_test/cmake_build
> [ 25%] Automatic MOC and UIC for target test_bin
> [ 25%] Built target test_bin_autogen
> [100%] Built target test_bin
> [RUN][INFO]: Adding Printers Directory to the PYTHONPATH
> environment
> variable
> [RUN][INFO]: Starting GDB ...
> Traceback (most recent call last):
> File
> "/home/xxx/src/gdb_printers/tests/test_qtprinters.py",
> line 9, in
> <module>
> from tests.test_helpers import start_at_function,
> stop_after_init_function, stop_after_end_function
> ModuleNotFoundError: No module named 'tests.test_helpers'
>
> Can you take a look and fix that issue ?
>
>
> > [RUN][INFO]: Starting GDB ...
>
> I suggest to add the output of the dbg_args variable to
> that line - it
> makes debugging easier.
>
> [RUN][INFO]: Starting GDB ... ['gdb', '--nx', '-q',
> '--batch', '-x',
> '/home/xxx/src/gdb_printers/tests/test_qtprinters.py',
> '/home/xxx/src/gdb_printers/tests/cpp_src_test/cmake_build/test_bin']
>
> Regards
> Ralf
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-finance-apps/attachments/20210716/5cf2c76b/attachment.htm>
More information about the Kde-finance-apps
mailing list