Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove usage of unittest2, use unittest from the standard library #249

Merged
merged 1 commit into from Mar 31, 2020

Conversation

hroncok
Copy link
Contributor

@hroncok hroncok commented Feb 25, 2020

Fixes #241

Fedora is removing the unittest2 package: https://bugzilla.redhat.com/show_bug.cgi?id=1794222

tuned is not targeting Python 2.6: #241 (comment)

One thing not present in Python 2.7 is assertItemsEqual() -- renamed to assertCountEqual().

Related, mock was also listed as a requirement in the spec file,
but all the imports are from unittest.mock, hence removed.

Fixes redhat-performance#241

Fedora is removing the unittest2 package: https://bugzilla.redhat.com/show_bug.cgi?id=1794222

tuned is not targeting Python 2.6: redhat-performance#241 (comment)

One thing not present in Python 2.7 is assertItemsEqual() -- renamed to assertCountEqual().

Related, mock was also listed as a requirement in the spec file,
but all the imports are from unittest.mock, hence removed.
Copy link
Contributor

@olysonek olysonek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@olysonek
Copy link
Contributor

/packit copr-build

@olysonek
Copy link
Contributor

@yarda Please take a look at this.

@packit-as-a-service
Copy link

There was an error while creating SRPM. You can re-trigger build by adding a comment (/packit copr-build) into this pull request.

Output:

Preparing of the upstream to the SRPM build failed: ['oc', 'cp', 'packit-prod-sandbox/docker-io-usercont-sandcastle-20200226-103821454653:/tmp/tmp.tQpuQXDrTu/t.tar.gz', '/tmp/tmpmq8m0x4_'] failed with 'error: tmp/tmp.tQpuQXDrTu/t.tar.gz no such file or directory\n'

@olysonek
Copy link
Contributor

/packit copr-build

@hroncok
Copy link
Contributor Author

hroncok commented Feb 26, 2020

I've tried to parse the packit error, and I think it is broken, but not by this PR.

@packit-as-a-service
Copy link

Congratulations! One of the builds has completed. 🍾

You can install the built RPMs by following these steps:

  • sudo yum install -y dnf-plugins-core on RHEL 8
  • sudo dnf install -y dnf-plugins-core on Fedora
  • dnf copr enable packit/redhat-performance-tuned-249
  • And now you can install the packages.

Please note that the RPMs should be used only in a testing environment.

@olysonek
Copy link
Contributor

I've tried to parse the packit error, and I think it is broken, but not by this PR.

Yes, it happens all the time. Nothing to worry about ;).

@hroncok
Copy link
Contributor Author

hroncok commented Mar 31, 2020

Can we please get this merged so I can backport it to https://src.fedoraproject.org/rpms/tuned/pull-request/2 ? Or should I backport AS IS?

@yarda
Copy link
Contributor

yarda commented Mar 31, 2020

Thanks, merging, sorry for delay.

@yarda yarda merged commit 595b8e0 into redhat-performance:master Mar 31, 2020
@hroncok hroncok deleted the no-unittest2 branch March 31, 2020 16:39
@hroncok
Copy link
Contributor Author

hroncok commented Mar 31, 2020

Thank You.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove unittest2 or import conditionally
3 participants