Skip to content

Commit

Permalink
use large_file fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
Panaetius committed Oct 12, 2020
1 parent c341c0b commit b4852cf
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
19 changes: 19 additions & 0 deletions docs/_sidebar.rst.inc
@@ -0,0 +1,19 @@

.. DO NOT MODIFY! THIS PAGE IS AUTOGENERATED!

.. toctree::
:maxdepth: 2

About Renku <https://renku.readthedocs.io/en/latest/introduction/index.html>
Getting Started <https://renku.readthedocs.io/en/latest/getting_started.html>
Using Renku <https://renku.readthedocs.io/en/latest/user/index.html>
Renku platform <https://renku.readthedocs.io/en/latest/platform.html>
.. toctree::
:maxdepth: 3

Renku Python CLI and Service <introduction>
.. toctree::
:maxdepth: 1

Get in touch <https://renku.readthedocs.io/en/latest/get_in_touch.html>
License <https://www.apache.org/licenses/LICENSE-2.0>
1 change: 0 additions & 1 deletion renku/core/commands/format/dataset_files.py
Expand Up @@ -16,7 +16,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
"""Serializers for dataset list files."""
import os
import re
from subprocess import PIPE, SubprocessError, run

Expand Down
8 changes: 3 additions & 5 deletions tests/cli/test_datasets.py
Expand Up @@ -602,7 +602,7 @@ def test_datasets_ls_files_check_exit_code(output_format, runner, project):
assert 0 == result.exit_code


def test_datasets_ls_files_lfs(tmpdir, runner, project):
def test_datasets_ls_files_lfs(tmpdir, large_file, runner, project):
"""Test file listing lfs status."""
# NOTE: create a dataset
result = runner.invoke(cli, ["dataset", "create", "my-dataset"])
Expand All @@ -616,9 +616,7 @@ def test_datasets_ls_files_lfs(tmpdir, runner, project):
new_file.write(str(1))
paths.append(str(new_file))

new_file = tmpdir.join("file_2")
new_file.write(str(2) * 200000)
paths.append(str(new_file))
paths.append(str(large_file))

# NOTE: add data to dataset
result = runner.invoke(cli, ["dataset", "add", "my-dataset"] + paths, catch_exceptions=False,)
Expand All @@ -630,7 +628,7 @@ def test_datasets_ls_files_lfs(tmpdir, runner, project):

lines = result.output.split("\n")
file1_entry = next(line for line in lines if "file_1" in line)
file2_entry = next(line for line in lines if "file_2" in line)
file2_entry = next(line for line in lines if large_file.name in line)

assert file1_entry
assert file2_entry
Expand Down

0 comments on commit b4852cf

Please sign in to comment.