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

pythonPackages.m3u8: init at 0.5.2 #74110

Merged
merged 1 commit into from Jan 9, 2020
Merged

Conversation

Scriptkiddi
Copy link
Contributor

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @

Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

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

There's no tests located in the pypi package, do you mind checking out the code from github:

running build_ext

----------------------------------------------------------------------
Ran 0 tests in 0.000s

OK
Finished executing setuptoolsCheckPhase
/nix/store/93asqnc8d8q1bpw32dfc198xfn9wxx2s-python3.7-m3u8-0.5.2

@Scriptkiddi
Copy link
Contributor Author

the python test are done running runtests and it sets up a http server, is that what we want in a python test?

@jonringer
Copy link
Contributor

There's some tests such as https://github.com/globocom/m3u8/blob/master/tests/test_parser.py which seem to be unit tests.

It doesn't have to be full integration tests, but tests are useful to ensure that the application still works in most use cases.

@Scriptkiddi
Copy link
Contributor Author

@jonringer added the tests

Comment on lines 17 to 19
${python.interpreter} -m pytest tests/test_parser.py
${python.interpreter} -m pytest tests/test_model.py
${python.interpreter} -m pytest tests/test_variant_m3u8.py
Copy link
Contributor

Choose a reason for hiding this comment

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

this can be simply:

  pytest tests/test_{parser,model,variant_m3u8}.py

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Contributor

Choose a reason for hiding this comment

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

pytest can accept multiple paths, and {...} is bash expansion

Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

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

pytest tests/test_{parser,model,variant_m3u8}.py

runs the same tests as

pytest tests/test_parser.py
pytest tests/test_model.py
 pytest tests/test_variant_m3u8.py

but it collects them all into a single run (which is easier to digest)

pkgs/development/python-modules/m3u8/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/m3u8/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/m3u8/default.nix Outdated Show resolved Hide resolved
Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

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

diff LGTM
commits LGTM
has tests 👍

[5 built, 54 copied (21.9 MiB), 4.1 MiB DL]
https://github.com/NixOS/nixpkgs/pull/74110
3 package were built:
python27Packages.m3u8 python37Packages.m3u8 python38Packages.m3u8

@jonringer
Copy link
Contributor

@GrahamcOfBorg build python27Packages.m3u8 python37Packages.m3u8 python38Packages.m3u8

@jonringer jonringer merged commit cef835d into NixOS:master Jan 9, 2020
@Scriptkiddi Scriptkiddi deleted the py3_m3u8 branch January 13, 2020 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants