Skip to content

Conversation

rchiodo
Copy link

@rchiodo rchiodo commented Nov 21, 2019

For #8673

Added a bunch of unit tests (in particular the one that was failing).

`;

test('Latex - Equations don\'t have $$', () => {
const markdown4 = `
Copy link
Author

Choose a reason for hiding this comment

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

THis is the one that was failing in the bug

Choose a reason for hiding this comment

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

Tip you can use dedent to indent code,
(its more reliable and avoids issues when code gets accidentally indented).
check

test('Execute a file and capture stdout (with unicode)', async () => {
const source = dedent`
import sys
sys.stdout.write("HELLO WORLD-₹-😄")
`;
const fileToExecute = await createPythonFile(source);
const output = await pythonDaemon.exec([fileToExecute], {});
assert.isUndefined(output.stderr);
assert.deepEqual(output.stdout, 'HELLO WORLD-₹-😄');
});

const endOfEnd = input.indexOf('}', endIndexes[i] + 1 + 8 * i);
// Loop until we run out string
while (start < input.length) {
// Check $$, $ and begin
Copy link
Author

Choose a reason for hiding this comment

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

Hmm, maybe I'll put a more general comment about the algorithm being used.

Choose a reason for hiding this comment

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

Even after reading the comments, its quite complicated. I guess there's nothing we can do about that...

@codecov-io
Copy link

codecov-io commented Nov 21, 2019

Codecov Report

Merging #8707 into master will decrease coverage by 0.26%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #8707      +/-   ##
=========================================
- Coverage   59.17%   58.9%   -0.27%     
=========================================
  Files         521     521              
  Lines       23985   24010      +25     
  Branches     3874    3874              
=========================================
- Hits        14192   14143      -49     
- Misses       8876    8951      +75     
+ Partials      917     916       -1
Impacted Files Coverage Δ
...science-ui/interactive-common/latexManipulation.ts 100% <100%> (+6.25%) ⬆️
src/client/testing/serviceRegistry.ts 48.64% <0%> (-46.85%) ⬇️
src/client/testing/codeLenses/main.ts 44.44% <0%> (-33.34%) ⬇️
...t/datascience/jupyter/jupyterDataRateLimitError.ts 66.66% <0%> (-33.34%) ⬇️
src/client/formatters/serviceRegistry.ts 75% <0%> (-25%) ⬇️
...ience/jupyter/jupyterDebuggerRemoteNotSupported.ts 75% <0%> (-25%) ⬇️
...cience/jupyter/jupyterDebuggerNotInstalledError.ts 60% <0%> (-20%) ⬇️
src/client/common/utils/icons.ts 83.33% <0%> (-16.67%) ⬇️
src/client/api.ts 78.57% <0%> (-14.29%) ⬇️
src/client/datascience/cellFactory.ts 57.69% <0%> (-12.83%) ⬇️
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1782b75...cbe8af3. Read the comment docs.

const endOfEnd = input.indexOf('}', endIndexes[i] + 1 + 8 * i);
// Loop until we run out string
while (start < input.length) {
// Check $$, $ and begin

Choose a reason for hiding this comment

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

Even after reading the comments, its quite complicated. I guess there's nothing we can do about that...

`;

test('Latex - Equations don\'t have $$', () => {
const markdown4 = `

Choose a reason for hiding this comment

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

Tip you can use dedent to indent code,
(its more reliable and avoids issues when code gets accidentally indented).
check

test('Execute a file and capture stdout (with unicode)', async () => {
const source = dedent`
import sys
sys.stdout.write("HELLO WORLD-₹-😄")
`;
const fileToExecute = await createPythonFile(source);
const output = await pythonDaemon.exec([fileToExecute], {});
assert.isUndefined(output.stderr);
assert.deepEqual(output.stdout, 'HELLO WORLD-₹-😄');
});

@rchiodo rchiodo merged commit 00e0472 into master Nov 21, 2019
@rchiodo rchiodo deleted the rchiodo/mathjax_conversion branch November 21, 2019 16:24
rchiodo added a commit that referenced this pull request Nov 21, 2019
… equation (#8707)

* First try

* Add news entry and fix multiples

* Add a bunch of comments
karthiknadig added a commit that referenced this pull request Nov 27, 2019
* Ensure we run PR, CI pipelines on release branches (#8471) (#8474)

* Port blue icon and altair background fixes into release (#8470)

* fix blue color on export icon (#8449)

* default non-text mimetypes to white background (#8452)

* Fix cells being erased when saving and then changing focus to another… (#8482) (#8485)

* Fix cells being erased when saving and then changing focus to another cell

* Make sure to use the source even if it's empty

* Fix timeout to be what it was before. 10 seconds isn't long enough (#8504)

* Ensure wheels experiment control and experiment groups uses right wheel (#8461) (#8546)

* Ensure wheels control group uses no wheel ptvsd
* Improve condition readability in jupyter debugger

* Adjust debug adapter experiment before release  (#8540) (#8553)

* Release branch: updating change log and package json (#8570)

* Change version numbers

* Update package lock json

* Update changelog

* Fix for 7999 - CTRL+Z should not undo at the top level (#8571)

* Fix arrowing up and down to save code too (#8574)

* Prompt selecting a file to save once (#8590)

* Prompt selecting a file to save once
* Better algorithm

* After pasting code, arrow keys don't navigate in a cell. (#8587)

* Don't look for a jupyter interpreter when creating blank notebook (#8596)

* Creating a new blank notebook should not require a search for jupyter.

* Fix bug caused by other fix.

* Update change log

* Update release date in change log (#8604)

* Fix converting from a python script (#8699)

* Fix converting from a python script

* Fix linter error

* Fix problem with $$ not being put around the correct items in a LaTeX equation (#8707)

* First try

* Add news entry and fix multiples

* Add a bunch of comments

* Modify changelog and version number

* Fixes to starting Jupyter in a Docker container. (#8715)

* Ensure we generate the right args when running in docker
* Fixes to starting `Jupyter` in a `Docker` container.

* Ensure arguments are generated correctly for `getRemoteLauncherCommand` when in debugger experiment (#8712)

* Return new debugger arguments when in experiment

* Add news item

* Updates to change log

* Revert tests due to incompatibilities
@lock lock bot locked as resolved and limited conversation to collaborators Nov 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants