Skip to content

Commit

Permalink
Merge pull request #513 from datamol-io/fix/remove-polyfill
Browse files Browse the repository at this point in the history
fix: Remove compromised link to polyfill.io
  • Loading branch information
DomInvivo committed Jun 27, 2024
2 parents 3efa7f1 + 706bc63 commit 745f673
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 200 deletions.
173 changes: 0 additions & 173 deletions graphium/utils/read_file.py

This file was deleted.

1 change: 0 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ extra_css:
- _assets/css/custom-graphium.css

extra_javascript:
- https://polyfill.io/v3/polyfill.min.js?features=es6
- https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js
- _assets/js/google-analytics.js

Expand Down
26 changes: 0 additions & 26 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,32 +150,6 @@ def test_nan_mad(self):
np.testing.assert_almost_equal(torch_mad.numpy(), numpy_mad, decimal=4, err_msg=err_msg)


def test_file_opener(tmp_path):
# Create a temporary file
txt_file = tmp_path / "test.txt"
txt_file.write_text("Hello, World!")

# Test opening file in read mode
with file_opener(txt_file, "r") as f:
assert f.read() == "Hello, World!"

# Test opening file in write mode
with file_opener(txt_file, "w") as f:
f.write("New text")

with file_opener(txt_file, "r") as f:
assert f.read() == "New text"

# Create a temporary gzip file
gzip_file = tmp_path / "test.txt.gz"
with gzip.open(gzip_file, "wt") as f:
f.write("Hello, Gzip!")

# Test opening gzip file in read mode
with file_opener(gzip_file, "r") as f:
assert f.read() == "Hello, Gzip!"


class test_SafeRun(ut.TestCase):
def test_safe_run(self):
# Error is caught
Expand Down

0 comments on commit 745f673

Please sign in to comment.