summaryrefslogtreecommitdiff
path: root/tests/test_html.py
Commit message (Collapse)AuthorAgeFilesLines
* refactor: file names match the commands they implement betterNed Batchelder2023-05-131-1/+1
|
* perf: make the context shortcodes even shorterNed Batchelder2023-04-011-0/+9
| | | | On the coverage.py metacov, this makes the HTML 5% smaller.
* test: check the HTML for context outputNed Batchelder2023-03-211-0/+3
|
* test: stricter regex to avoid false CodeQL alarmsNed Batchelder2023-02-221-2/+2
| | | | | | | | | Will fix: https://github.com/nedbat/coveragepy/security/code-scanning/3 https://github.com/nedbat/coveragepy/security/code-scanning/4 (though tbh, not sure how to close those as fixed?)
* style: use good style for annotated defaults parametersNed Batchelder2023-01-051-6/+6
|
* mypy: use __future__ uniformly in checked filesNed Batchelder2023-01-051-0/+2
|
* mypy: check tests/goldtest.py, tests/test_html.pyNed Batchelder2022-12-311-74/+89
|
* fix: certain strange characters caused reporting to fail. #1512Ned Batchelder2022-12-231-0/+32
| | | | | | It turns out that str.splitlines() will break text on some characters that file.readline() does not! Use readline() to read source files the same way that Python does.
* style: fix spellingNed Batchelder2022-11-281-5/+5
| | | | un-executed, white space, time stamp.
* build: allow for .devN version numbersNed Batchelder2022-11-171-1/+1
|
* test: tests of HTML's helper assert_valid_hrefsNed Batchelder2022-05-201-1/+21
|
* test: check that our generated html files have valid hrefsNed Batchelder2022-05-191-1/+25
|
* style: parens should indent the same as their opening lineNed Batchelder2022-05-011-4/+4
|
* fix: don't write a .gitignore unless the directory is emptyNed Batchelder2022-01-111-0/+7
|
* refactor(test): move unicode handling tests to individual test filesNed Batchelder2021-11-201-0/+27
| | | | Eight fewer sub-processes
* refactor(test): no more subprocesses in test_html.pyNed Batchelder2021-11-201-9/+13
|
* fix: don't overwrite a .gitignore in the html output directory. #1244nedbat/1244-againNed Batchelder2021-11-121-0/+7
|
* refactor(test): use the expected name for initializing tests.Ned Batchelder2021-11-071-2/+2
| | | | | | | | | Originally I used setup_test because something went wrong when I used setUp. I wrote https://github.com/pytest-dev/pytest/issues/8424 about it. There they say to use `-p no:nose` to disable nose interpretation. But now I simply went back to setUp, and all seems well? Not sure what changed, but using the expected name is better.
* style: remove implicit string concatenationNed Batchelder2021-10-301-24/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | .. and also add trailing commas where needed to remove ambiguity. I used semgrep with this config: ``` rules: - id: implicit-string-concatenation pattern: | "$X" "$Y" languages: - python message: string cat BAD severity: INFO ``` Running it showed this: ``` $ semgrep --config=../lab/string-cat.yml coverage tests doc ci igor.py setup.py __main__.py Running 1 rules... setup.py severity:info rule:lab.implicit-string-concatenation: string cat BAD 128: 'https://tidelift.com/subscription/pkg/pypi-coverage' 129: '?utm_source=pypi-coverage&utm_medium=referral&utm_campaign=pypi' tests/test_api.py severity:info rule:lab.implicit-string-concatenation: string cat BAD 319: "!coverage.py: This is a private format, don't read it directly!" 320: '{"lines":{"/private/tmp/foo.py":[1,5,2,3]}}' tests/test_html.py severity:info rule:lab.implicit-string-concatenation: string cat BAD 614: ('<span class="key">if</span> <span class="num">1</span> ' 615: '<span class="op">&lt;</span> <span class="num">2</span>'), -------------------------------------------------------------------------------- 616: (' <span class="nam">a</span> ' 617: '<span class="op">=</span> <span class="num">3</span>'), -------------------------------------------------------------------------------- 665: ('<span class="key">if</span> <span class="nam">x</span> ' 666: '<span class="op">&lt;</span> <span class="num">2</span>'), -------------------------------------------------------------------------------- 667: (' <span class="nam">a</span> <span class="op">=</span> ' 668: '<span class="num">3</span>'), -------------------------------------------------------------------------------- 949: ('<span class="key">if</span> <span class="num">1</span> ' 950: '<span class="op">&lt;</span> <span class="num">2</span>'), -------------------------------------------------------------------------------- 951: (' <span class="nam">a</span> <span class="op">=</span> ' 952: '<span class="num">3</span>'), ran 1 rules on 134 files: 8 findings ``` This wasn't all of the instances, so I wrote a bug report: https://github.com/returntocorp/semgrep/issues/4184
* feat: html output directory gets a .gitignore file. #1244Ned Batchelder2021-10-271-0/+1
|
* fix(html): fix a few problems with the html reportNed Batchelder2021-10-231-11/+11
| | | | | | | | | | - highlights weren't showing - anchored lines were not visible - some j/k motions were broken - clicking the big buttons at the top didn't work
* test: sometimes pytest directories have a "popen" componentNed Batchelder2021-10-231-3/+4
| | | | | Those have to be scrubbed too. I'm not sure why it's sometimes there, sometimes not. Maybe xdist?
* refactor: no more need for a search path for static filesNed Batchelder2021-10-231-57/+1
| | | | | | | We used to search an OS-specific directory in addition to our own, specifically so that Debian could use an OS-installed copy of jQuery and its plugins. But we no longer have jQuery or any third-party JavaScript code, so we don't need to search the Debian directories.
* test: remove some obsolete HTML scrubsNed Batchelder2021-10-171-5/+0
|
* test: don't show these functions when HTML gold files failNed Batchelder2021-10-171-0/+1
|
* test: html scrubs need to account for pytest dir namingNed Batchelder2021-10-171-0/+1
|
* test: improve this one html testNed Batchelder2021-10-171-3/+3
|
* refactor: no need for maybe-u prefixes in test regexesNed Batchelder2021-10-101-1/+1
| | | | That was for Python 2, which we don't support anymore.
* feat: mention skipped file counts in the HTML report. #1163Ned Batchelder2021-08-061-0/+4
|
* test: change how we keep mismatched actual outputNed Batchelder2021-07-151-0/+1
| | | | | | | | | | | | Now when a goldtest has a failure, the actual mismatched output will be written to the tests/actual directory. Along the way, I removed some obsolete settings which were only used by unittest and unittest_mixins, which we no longer use: - COVERAGE_KEEP_TMP - COVERAGE_ENV_ID - $TMPDIR/coverage_test
* fix: generate flat file names differentlyNed Batchelder2021-07-151-3/+10
| | | | | | | | Fixes a few unusual issues with reports: - #580: HTML report generation fails on too long path - #584: File collisions in coverage report html - #1167: Remove leading underscore in coverage html
* feat: warnings are now real warningsNed Batchelder2021-05-301-7/+8
| | | | | | This makes coverage warnings visible when running test suites under pytest. But it also means some uninteresting warnings would show up in our own test suite, so we had to catch or suppress those.
* refactor: move exceptions to their own moduleNed Batchelder2021-05-021-1/+1
|
* refactor: pyupgrade --py36-plus tests/**.pyNed Batchelder2021-05-021-8/+7
|
* refactor: remove unneeded backward.py shimsNed Batchelder2021-05-011-4/+3
| | | | | | | | | | | | | | | Removed were: - StringIO - configparser - string_class - unicode_class - range - zip_longest - get_thread_id - path_types - shlex_quote - reprlib
* refactor: remove code explicitly choosing between py2 and py3Ned Batchelder2021-05-011-2/+0
|
* refactor: our own change_dir context managerNed Batchelder2021-03-111-1/+1
| | | | We don't need to use the one from unittest_mixins.
* test: reduce use of unittestNed Batchelder2021-03-111-4/+4
|
* test: have pytest collect test classes uniformlyNed Batchelder2021-03-111-1/+1
|
* refactor: simplify a one-iteration loopNed Batchelder2021-02-251-4/+3
|
* style: fix long lines and avoid backslashesnedbat/unittest2pytestNed Batchelder2021-01-311-17/+13
|
* style: correct placement of auto-added pytest importsNed Batchelder2021-01-311-1/+1
|
* refactor: unittest2pytest -w testsNed Batchelder2021-01-311-47/+35
| | | | One step of moving to pure pytest tests.
* skip_covered and skip_empty for HTML. #1090Ned Batchelder2021-01-101-19/+33
|
* Need new gold files for pep626 partial branch HTML reportNed Batchelder2021-01-101-16/+34
|
* Fix tests for GitHub windows platformNed Batchelder2020-11-281-1/+3
| | | | | | | | | | | | | | The tests were failing because of differences in file paths. It was comparing: C:\Users\runneradmin\AppData\... to: C:\Users\RUNNER~1\AppData\... and failing. These changes normalize the file paths so the comparisons work properly.
* More bitbucket->github urlsNed Batchelder2020-08-181-5/+5
|
* Displaying timezone information in HTML report (#960)Xie Yanbo2020-07-231-0/+6
| | | | | | | | * Displaying timezone information in HTML report * A helpber to format datetime with local timezone * No backward compatibility with older python versions
* fix context reporting for relative_filesDavid Szotten2019-12-211-0/+17
| | | | | | fix reporting of contexts when `relative_files = True` fixes #900
* Polish up cmd.rstNed Batchelder2019-12-081-1/+1
|