From 1cf85ea45073482dcaffe4a71b4259e285dd7edf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=2E=20Fernando=20S=C3=A1nchez?= Date: Tue, 30 Apr 2019 16:16:46 +0200 Subject: [PATCH] Avoid writing gexf in test --- Makefile | 7 +++++-- tests/test_main.py | 4 +++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 906cce1..63023d1 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,7 @@ -test: +quick-test: docker-compose exec dev python -m pytest -s -v -.PHONY: test \ No newline at end of file +test: + docker run -t -v $$PWD:/usr/src/app -w /usr/src/app python:3.7 python setup.py test + +.PHONY: test diff --git a/tests/test_main.py b/tests/test_main.py index 286c1a8..481b08c 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -1,6 +1,7 @@ from unittest import TestCase import os +import io import yaml import pickle import networkx as nx @@ -217,7 +218,8 @@ class TestMain(TestCase): """ G = nx.random_geometric_graph(20, 0.1) env = Environment(topology=G) - env.dump_gexf('/tmp/dump-gexf/prueba.gexf') + f = io.BytesIO() + env.dump_gexf(f) def test_save_graph(self): '''