mahmoudimus / nose-timer

A timer plugin for nosetests (how much time does every test take?)
MIT License
126 stars 33 forks source link

fail to run the tests #93

Closed hubutui closed 4 years ago

hubutui commented 4 years ago

here is the output:

tests/test_plugin.py:37: in test_format_report_line
    self.assertEqual(
E   AssertionError: "[err[16 chars]Mock name='test' id='140132806050288'>: 1.0000s" != "[err[16 chars]Mock name='test' id='140132806050288'>: \x1b[31m1.0000s\x1b[0m"
E   - [error] 0.10% <MagicMock name='test' id='140132806050288'>: 1.0000s
E   + [error] 0.10% <MagicMock name='test' id='140132806050288'>: 1.0000s
E   ?                                                             +++++       ++++

for complete build log, check python-nose-timer.log. I'm building this pkg in the latest ArchLinux environment.

skudriashev commented 4 years ago

@hubutui did it work before for you?

hubutui commented 4 years ago

Yeah, according to the build history, the test passed in version 0.7.5.

skudriashev commented 4 years ago

Here is run on TravisCI: https://travis-ci.org/github/mahmoudimus/nose-timer/jobs/662854089?utm_medium=notification&utm_source=github_status

hubutui commented 4 years ago

Hmm, not sure why it failed. Did you test the latest python (3.8.2)?

skudriashev commented 4 years ago

@hubutui, no, 3.8.0. Let me try with 3.8.2.

skudriashev commented 4 years ago

@hubutui here is run on Python 3.8.2 https://travis-ci.org/github/mahmoudimus/nose-timer/jobs/663120316?utm_medium=notification&utm_source=github_status

skudriashev commented 4 years ago

@hubutui could you please provide more details of how you run those tests?

hubutui commented 4 years ago

You could reproduce with ArchLinux docker. Here is the PKGBUILD file I use for building pkg in ArchLinux.

  1. create a ArchLinux container, docker run -it archlinux
  2. install deps and necessary pkgs, pacman -S base-devel wget python-mock python-parameterized python-nose
  3. create a non-root user as we could not run makepkg with root user, useradd -m test
  4. switch to the user, su -l test
  5. download PKGBUILD, and rename it to PKGBUILD. github don't let me upload a file without extension suffix.
  6. build with: makepkg.

If you have ArchLinux in virtualbox, you could simply install base-devel devtools, download the PKGBUILD file, and run extra-x86_64-build, it will create a clean chroot environment, install deps, and build the pkg. All deps are assumed to be the latest version in ArchLinux's official repo. Let me know if I miss something.

skudriashev commented 4 years ago

@hubutui in your installation you need to install one more package: python-termcolor. This is required for tests to pass.

skudriashev commented 4 years ago

@hubutui closing this issue for now. Feel free to reopen if you have any questions. Thanks!