Skip to content

Commit

Permalink
language/python: update coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
hattya committed Apr 1, 2024
1 parent bc820b1 commit fbe51fc
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 4 deletions.
9 changes: 9 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
Aster Changelog
===============

Version 0.5
-----------

* Improve ``language/python`` module.

* Add ``coverage.json`` function.
* Add ``coverage.lcov`` function.


Version 0.4
-----------

Expand Down
14 changes: 13 additions & 1 deletion doc/language/python.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ python.coverage(...args)
properties of this function.

Requirements
- `coverage.py <https://bitbucket.org/ned/coveragepy>`_
- `coverage.py <https://github.com/nedbat/coveragepy>`_


coverage.annotate(...args)
Expand All @@ -38,6 +38,18 @@ coverage.html(...args)
``coverage.html`` represents ``coverage html``.


coverage.json(...args)
~~~~~~~~~~~~~~~~~~~~~~

``coverage.json`` represents ``coverage json``.


coverage.lcov(...args)
~~~~~~~~~~~~~~~~~~~~~~

``coverage.lcov`` represents ``coverage lcov``.


coverage.report(...args)
~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down
10 changes: 9 additions & 1 deletion lib/language/python.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// aster :: language/python.js
//
// Copyright (c) 2018-2020 Akinori Hattori <hattya@gmail.com>
// Copyright (c) 2018-2024 Akinori Hattori <hattya@gmail.com>
//
// SPDX-License-Identifier: MIT
//
Expand Down Expand Up @@ -41,6 +41,14 @@ coverage.html = function html() {
return coverage.apply(null, ['html'].concat(Array.prototype.slice.call(arguments)));
};

coverage.json = function json() {
return coverage.apply(null, ['json'].concat(Array.prototype.slice.call(arguments)));
};

coverage.lcov = function lcov() {
return coverage.apply(null, ['lcov'].concat(Array.prototype.slice.call(arguments)));
};

coverage.report = function report() {
return coverage.apply(null, ['report'].concat(Array.prototype.slice.call(arguments)));
};
Expand Down
10 changes: 9 additions & 1 deletion std.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion test/language/python.spec.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// aster :: language/python.spec.js
//
// Copyright (c) 2020 Akinori Hattori <hattya@gmail.com>
// Copyright (c) 2020-2024 Akinori Hattori <hattya@gmail.com>
//
// SPDX-License-Identifier: MIT
//
Expand Down Expand Up @@ -53,6 +53,8 @@ describe('language', () => {
['combine'],
['erase'],
['html'],
['json'],
['lcov'],
['report'],
['xml'],
])('.%s()', (cmd) => {
Expand Down

0 comments on commit fbe51fc

Please sign in to comment.