Test failure on Linux

未关闭
#4 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
cpp, python
领域
testing, tooling

调研方向

从 libcodegen/File.h 和 tests.py 开始,然后在 Ubuntu 上重现 test_codegen,并将生成的代码与预期字符串进行比较。跟踪所报告的 include 更改周围与平台相关的行为;完成意味着测试在 Linux 和 Windows 上均以预期输出通过。

由索引模型根据 Issue 内容生成。

描述

After applying this patch:

--- a/libcodegen/File.h
+++ b/libcodegen/File.h
@@ -7,6 +7,7 @@
 #ifndef FILE_H
 #define FILE_H
 #include <string.h>
+#include <unistd.h>
 #ifdef _WIN32
 #include "win_unistd.h"
 #endif 

I've been able to compile this extension on Ubuntu.

Running the test fails the same as in my previous report on Windows platform:

F
======================================================================
FAIL: test_codegen (tests.EchoprintTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/klo/git/python-echoprint/tests.py", line 8, in test_codegen
    self.assertEqual(d['code'], 'eJydz7sNAzAIRdGV-GPGiQHvP0KcypVdpDnNFUIPANDhAdWL963AC7T_YbrSnjJMocwJo7Qy5FAELdcqtpBt6Ezu38I0r4MH7e-3iroTDooJAZO7LO2AWeszaBXyXt_anXgQlcBr_QIy12Qh')
AssertionError: 'eJyd0juuQyEMRdEp2cbYZjjgz_yHEKrHy1VCkWYVW0I6CAAAFX6G4sb9LMMNtBtMN3q_cV_V2g2U32n0FUusWpTsn0h1NukQooQjImzVPwiSn-0PlsIm1pe33K9S06QOOgjw0Q7YNMEEW7U1vRvGhMzBqmpTi2B23KNkjBg83YEOblrz0Q5WwV5jmWUsXct65YES9_T3dsC-ryO8mnwCPfZ2qsC2_1F6H2QH7jzw0Q4vGHW94A==' != 'eJydz7sNAzAIRdGV-GPGiQHvP0KcypVdpDnNFUIPANDhAdWL963AC7T_YbrSnjJMocwJo7Qy5FAELdcqtpBt6Ezu38I0r4MH7e-3iroTDooJAZO7LO2AWeszaBXyXt_anXgQlcBr_QIy12Qh'

----------------------------------------------------------------------
Ran 1 test in 0.105s

Can you please fix the bug?

Thanks

主要语言
C++
星标
28
派生
11
PR 合并指标
30 天内没有已合并 PR

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

bfirsh/python-echoprint 的其他 Issue

查看 bfirsh/python-echoprint 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。